bkabrda / rpms / grep

Forked from rpms/grep 6 years ago
Clone
ce62507
diff --git a/doc/grep.in.1 b/doc/grep.in.1
712f266
index b6362ee..5a1e3ea 100644
ce62507
--- a/doc/grep.in.1
ce62507
+++ b/doc/grep.in.1
712f266
@@ -314,7 +314,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
712f266
@@ -327,7 +327,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
712f266
@@ -340,13 +340,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
712f266
index 8dbf86e..e3461a7 100644
6c1ddd4
--- a/src/grep.c
6c1ddd4
+++ b/src/grep.c
712f266
@@ -1781,6 +1781,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\