bug-gzip
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Fwd: Bug#466717: gzip: option --color[=tty] doesn't work with option -H


From: Bdale Garbee
Subject: [Fwd: Bug#466717: gzip: option --color[=tty] doesn't work with option -H]
Date: Fri, 22 Feb 2008 09:15:05 -0700

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 --- 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 ---

reply via email to

[Prev in Thread] Current Thread [Next in Thread]