diff options
-rw-r--r-- | doc/grep.in.1 | 11 | ||||
-rw-r--r-- | doc/grep.texi | 4 |
2 files changed, 15 insertions, 0 deletions
diff --git a/doc/grep.in.1 b/doc/grep.in.1 index 91c0bcac..7d5dfe5a 100644 --- a/doc/grep.in.1 +++ b/doc/grep.in.1 @@ -680,6 +680,17 @@ Search only files whose base name matches .I GLOB (using wildcard matching as described under .BR \-\^\-exclude ). +If contradictory +.B \-\^\-include +and +.B \-\^\-exclude +options are given, the last matching one wins. +If no +.B \-\^\-include +or +.B \-\^\-exclude +options match, a file is included unless the first such option is +.BR \-\^\-include . .TP .BR \-r ", " \-\^\-recursive Read all files under each directory, recursively, diff --git a/doc/grep.texi b/doc/grep.texi index bb76ae10..0c0bb124 100644 --- a/doc/grep.texi +++ b/doc/grep.texi @@ -728,6 +728,10 @@ this is equivalent to the @samp{--binary-files=without-match} option. @cindex searching directory trees Search only files whose name matches @var{glob}, using wildcard matching as described under @option{--exclude}. +If contradictory @option{--include} and @option{--exclude} options are +given, the last matching one wins. If no @option{--include} or +@option{--exclude} options match, a file is included unless the first +such option is @option{--include}. @item -r @itemx --recursive |