[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#51860: [PATCH] Reinstate Binary file matches to stdout
From: |
Paul Eggert |
Subject: |
bug#51860: [PATCH] Reinstate Binary file matches to stdout |
Date: |
Sat, 20 Nov 2021 22:59:43 -0800 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.3.1 |
On 11/20/21 17:38, Duncan Roe wrote:
This was *documented* *behaviour*.
No, it wasn't documented whether the "Binary file matches" message is
sent to stdout or to stderr. But now that you mention it, this should be
documented. First patch attached, and installed into the development
version.
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.
Since you have provided me with a workaround, I have no further interset in this
bug.
OK, closing the bug report. Thanks for reporting the issues.
0001-doc-binary-file-matches-stderr-Bug-51860.patch
Description: Text Data
0002-grep-s-does-not-suppress-binary-file-matches.patch
Description: Text Data