Subject: bug in gzgrep?
From: "Robert M. Lawhead" <[email-masked]>
To: [email-masked]
Cc: [email-masked], [email-masked]
Date: Thu, 15 May 2014 16:35:24 -0700
List-Id: <debbugs-submit.debbugs.gnu.org>

% gzgrep --version
gzgrep (gzip) 1.4
Copyright (C) 2007, 2009-2010 Free Software Foundation, Inc.
This is free software.  You may redistribute copies of it under the terms of
the GNU General Public License <http://www.gnu.org/licenses/gpl.html>.
There is NO WARRANTY, to the extent permitted by law.

Written by Jean-loup Gailly.

% mkdir gzgrep_test
% cd $_
% echo foo >a
% echo foo >b
% echo bar >c
%
% /usr/bin/gzgrep foo *
a:foo
b:foo

# brokeness...
% /usr/bin/gzgrep -h foo *
a:foo
b:foo

% ~/bin/gzgrep foo *
a:foo
b:foo

# fixed
% ~/bin/gzgrep -h foo *
foo
foo

# how does grep behave
% /bin/grep -h foo *
foo
foo

# The hack I made
% diff -bw /usr/bin/gzgrep /home/solaris/staff/rml/bin/gzgrep
157a158
> [[ $grep == @(*-h*) ]] && with_filename=0 && no_filename=1    # rml