bug-grep
[Top][All Lists]
Advanced

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

Re: [PATCH] add --group-separator=FOO and --no-group-separator


From: Jim Meyering
Subject: Re: [PATCH] add --group-separator=FOO and --no-group-separator
Date: Sat, 20 Feb 2010 19:14:00 +0100

Paolo Bonzini wrote:
> I took inspiration from bug #28906 to implement this.  Improvements
> to the wording in the manual are welcome.  Otherwise okay?

Thanks!  That looks like a fine change.
Adding a line or two in NEWS would nice.

It'd be good to mention in the individual descriptions
that these new options relate to groups of _context_ lines.
I.e., without an option like -A, -B or -C, they're ignored.

> * src/grep.c (group_separator): New.
> (long_options): Add --group-separator=FOO and --no-group-separator.
> (prtext): Print group_separator instead of SEP_STR_GROUP.  Optionally
> suppress the separator altogether.
> (main) Handle GROUP_SEPARATOR_OPTION.
> * doc/grep.texi (Context control): Document it.
> * tests/yesno.sh: Add testcases.
> ---
>  doc/grep.texi  |   22 +++++++++++++++++-----
>  src/grep.c     |   16 ++++++++++++----
>  tests/yesno.sh |    9 ++++++++-
>  3 files changed, 37 insertions(+), 10 deletions(-)
>
> diff --git a/doc/grep.texi b/doc/grep.texi
> index 3c2849e..44d68be 100644
> --- a/doc/grep.texi
> +++ b/doc/grep.texi
> @@ -513,6 +513,17 @@ Print @var{num} lines of leading context before matching 
> lines.
>  @cindex context
>  Print @var{num} lines of leading and trailing output context.
>
> address@hidden address@hidden
> address@hidden --group-separator
> address@hidden group separator
> +Print @var{string} instead of @samp{--} around disjoint groups
> +of lines.

s/around/between/
s/lines/context lines/

> address@hidden --no-group-separator
> address@hidden --group-separator
> address@hidden group separator
> +Print disjoint groups of lines adjacent to each other.
...




reply via email to

[Prev in Thread] Current Thread [Next in Thread]