bkabrda / rpms / grep

Forked from rpms/grep 6 years ago
Clone
ce62507
diff --git a/doc/grep.in.1 b/doc/grep.in.1
501f9e6
index 40c9586..a4e89eb 100644
ce62507
--- a/doc/grep.in.1
ce62507
+++ b/doc/grep.in.1
501f9e6
@@ -335,7 +335,7 @@ Print
ce62507
 .I NUM
ce62507
 lines of trailing context after matching lines.
ce62507
 Places a line containing a group separator
ce62507
-.RB ( \-\^\- )
ce62507
+.RB "(described under " \-\^\-group\-separator )
ce62507
 between contiguous groups of matches.
ce62507
 With the
ce62507
 .B \-o
501f9e6
@@ -348,7 +348,7 @@ Print
ce62507
 .I NUM
ce62507
 lines of leading context before matching lines.
ce62507
 Places a line containing a group separator
ce62507
-.RB ( \-\^\- )
ce62507
+.RB "(described under " \-\^\-group\-separator )
ce62507
 between contiguous groups of matches.
ce62507
 With the
ce62507
 .B \-o
501f9e6
@@ -361,13 +361,24 @@ Print
ce62507
 .I NUM
ce62507
 lines of output context.
ce62507
 Places a line containing a group separator
ce62507
-.RB ( \-\^\- )
ce62507
+.RB "(described under " \-\^\-group\-separator )
ce62507
 between contiguous groups of matches.
ce62507
 With the
ce62507
 .B \-o
ce62507
 or
ce62507
 .B \-\^\-only\-matching
ce62507
 option, this has no effect and a warning is given.
ce62507
+.TP
ce62507
+.BI \-\^\-group\-separator= SEP
ce62507
+Use
ce62507
+.I SEP
ce62507
+as a group separator. By default
ce62507
+.I SEP
ce62507
+is double hyphen
ce62507
+.RB ( \-\^\- ).
ce62507
+.TP
ce62507
+.B \-\^\-no\-group-separator
ce62507
+Use empty string as a group separator.
ce62507
 .SS "File and Directory Selection"
ce62507
 .TP
ce62507
 .BR \-a ", " \-\^\-text
6c1ddd4
diff --git a/src/grep.c b/src/grep.c
501f9e6
index 8d22aec..a2de03d 100644
6c1ddd4
--- a/src/grep.c
6c1ddd4
+++ b/src/grep.c
501f9e6
@@ -1986,6 +1986,8 @@ Context control:\n\
ce62507
 "));
ce62507
       printf (_("\
ce62507
   -NUM                      same as --context=NUM\n\
ce62507
+      --group-separator=SEP use SEP as a group separator\n\
ce62507
+      --no-group-separator  use empty string as a group separator\n\
ce62507
       --color[=WHEN],\n\
ce62507
       --colour[=WHEN]       use markers to highlight the matching strings;\n\
ce62507
                             WHEN is 'always', 'never', or 'auto'\n\