GNU bug report logs - #55641
Using colours with grep

Previous Next

Package: grep;

Reported by: goncholden <goncholden <at> protonmail.com>

Date: Wed, 25 May 2022 20:49:01 UTC

Severity: normal

Done: Paul Eggert <eggert <at> cs.ucla.edu>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Paul Eggert <eggert <at> cs.ucla.edu>
To: Gary Johnson <garyjohn <at> spocom.com>
Cc: 55641 <at> debbugs.gnu.org, goncholden <goncholden <at> protonmail.com>
Subject: bug#55641: Using colours with grep
Date: Sat, 28 May 2022 10:36:57 -0700
On 5/26/22 20:27, Gary Johnson wrote:
>      $ export GREP_COLORS='ms=01:33'
>      $ man grep | grep prevents
>      $ man grep | GREP_COLOR='01;32' grep prevents
> 
> Now, both results have "prevents" in yellow, which agrees with the
> man page.  However, the OP expected the GREP_COLOR setting on the
> command line to override the GREP_COLORS setting in the environment,
> which it doesn't.

Thanks, your explanation let me see the problem.

Since GREP_COLOR is deprecated, I doubt whether we should be changing 
grep to support this obsolescent usage in a different way. When it comes 
to obsolescent features, the only thing we're likely to change is to 
remove them entirely (as any change will disrupt somebody...).




This bug report was last modified 2 years and 319 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.