--- Begin Message ---
Subject: |
Bug#466717: gzip: option --color[=tty] doesn't work with option -H |
Date: |
Wed, 20 Feb 2008 16:21:17 +0100 |
User-agent: |
Mutt/1.5.17-vl-r19795 (2008-02-20) |
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 ---