Re: [PATCH v2 2/2] grep: long context options

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Am 02.08.2011 03:01, schrieb Tait:
> René Scharfe <rene.scharfe_lsrfire.ath.cx> said (on 2011/08/01):
>> Take long option names for -A (--after-context), -B (--before-context)
>> and -C (--context) from GNU grep and add a similar long option name
>> for -W (--function-context).
> 
> Why not just add --context=function? Then when I want --context=indent
> to give context based on the indent-level, it is an intuitive extension
> of the existing options. (Of course, --context=<number> would still do
> exactly what it does now.)

With the current patches, you can use --function-context together with
--context=<num> to specify a minimum number of context lines to show,
even beyond function boundaries.

I'd expect a --context=function option to be equivalent to -W -C0 and
--context=<num> to be equivalent to -C<num> --no-function-context, so
the syntax would be limited in that regard (or be unintuitive to me).

We can still add it on top, though.

René
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]