diff options
author | Paul Eggert <eggert@cs.ucla.edu> | 2021-11-20 22:53:55 -0800 |
---|---|---|
committer | Paul Eggert <eggert@cs.ucla.edu> | 2021-11-20 22:55:53 -0800 |
commit | af79b17356f2edeca2908c14d922a24f659d4a96 (patch) | |
tree | 8d443c04de3dd1a609f676f278c8b3c8d5c6d69e /src/grep.c | |
parent | 56762bfda567ac2f96ab2f88e8117b5602bccddb (diff) | |
download | grep-af79b17356f2edeca2908c14d922a24f659d4a96.tar.gz |
grep: -s does not suppress “binary file matches”
* src/grep.c (grep): Implement this.
* tests/binary-file-matches: Add regression test.
Diffstat (limited to 'src/grep.c')
-rw-r--r-- | src/grep.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -1646,7 +1646,7 @@ grep (int fd, struct stat const *st, bool *ineof) finish_grep: done_on_match = done_on_match_0; out_quiet = out_quiet_0; - if (binary_files == BINARY_BINARY_FILES && ! (out_quiet | suppress_errors) + if (binary_files == BINARY_BINARY_FILES && !out_quiet && (encoding_error_output || (0 <= nlines_first_null && nlines_first_null < nlines))) error (0, 0, _("%s: binary file matches"), input_filename ()); |