One of the users of my Debian package of gzip points out that the zgrep
wrapper does not behave as expected when --color and -H are both called
for.  See the attached message for more detail.

Bdale

--- Begin Message ---
Package: gzip
Version: 1.3.12-5
Severity: normal

Option --color with value 'tty' (the default) doesn't work with
option -H (zgrep behaves as if --color weren't given). This is
specific to zgrep (grep doesn't have this problem).

To reproduce the bug:
  echo foo > bar
  zgrep --color -H o bar

The cause is that when -H is given, the output of grep is filtered
thus is no longer directly sent to a terminal. A possible fix would
be to detect if the option --color[=tty] is given and if the zgrep
output is on a terminal, and in such a case, replace the option by
--color=always.

-- System Information:
Debian Release: lenny/sid
  APT prefers unstable
  APT policy: (500, 'unstable'), (500, 'stable')
Architecture: amd64 (x86_64)

Kernel: Linux 2.6.24-1-amd64 (SMP w/2 CPU cores)
Locale: LANG=POSIX, LC_CTYPE=en_US.ISO8859-1 (charmap=ISO-8859-1)
Shell: /bin/sh linked to /bin/bash

Versions of packages gzip depends on:
ii  debianutils                   2.28.3     Miscellaneous utilities specific t
ii  libc6                         2.7-8      GNU C Library: Shared libraries

gzip recommends no packages.

-- no debconf information



--- End Message ---

Reply via email to