On Sat, Nov 20, 2021 at 10:59:43PM -0800, Paul Eggert wrote: > On 11/20/21 17:38, Duncan Roe wrote: > > > I'd further suggest biaary matches output to stderr by the new option be not > > affected by the setting of `-s`, only by `-I`. This reinstates > > orthogonality of > > -s and -I which 271793f0 broke. > > Hmm, you have a point that -s is documented to "Suppress error messages > about nonexistent or unreadable files" and it's plausible to say that the > "binary file matches" diagnostic, although it is about a binary file that > 'grep' has some trouble reading, is not about a file that is "unreadable". > So, let's fix the code to match that part of the spec again. Second patch > attached and installed. > Excellent. But I think you still need the patch below.
Cheers ... Duncan. ======================= diff --git a/doc/grep.texi b/doc/grep.texi index c3c4bbf..2482fa0 100644 --- a/doc/grep.texi +++ b/doc/grep.texi @@ -1819,8 +1819,7 @@ to output lines even from files that appear to be binary, use the @option{-a} or @samp{--binary-files=text} option. To eliminate the ``Binary file matches'' messages, use the @option{-I} or -@samp{--binary-files=without-match} option, -or the @option{-s} or @option{--no-messages} option. +@samp{--binary-files=without-match} option. @item Why doesn't @samp{grep -lv} print non-matching file names?