Package: grep;
Reported by: Adrian H <adrianh.bsc <at> gmail.com>
Date: Thu, 5 Apr 2018 21:32:01 UTC
Severity: wishlist
To reply to this bug, email your comments to 31071 AT debbugs.gnu.org.
the display of automated, internal messages from the tracker.
View this report as an mbox folder, status mbox, maintainer mbox
bug-grep <at> gnu.org:bug#31071; Package grep.
(2018年4月05日 21:32:01 GMT) Full text and rfc822 format available.Adrian H <adrianh.bsc <at> gmail.com>:bug-grep <at> gnu.org.
(2018年4月05日 21:32:01 GMT) Full text and rfc822 format available.Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):
From: Adrian H <adrianh.bsc <at> gmail.com> To: bug-grep <at> gnu.org Subject: Previous color lost when using --color=always option Date: Thu, 5 Apr 2018 12:44:29 -0400
If I use grep --color=always and it matches on a line that is already coloured, it results in the text after the match is reset to the terminal's default colour/attributes. E.g. This just shows a line with some colour/attributes set: $ echo The quick brown fox jumps over the lazy dog | > GREP_COLOR='03;36' grep --color=always '.*' ESC[03;36mESC[KThe quick brown fox jumps over the lazy dogESC[mESC[K This shows the same line with fox highlighted in other attributes: $ echo The quick brown fox jumps over the lazy dog | > GREP_COLOR='03;36' grep --color=always '.*' | > GREP_COLOR='01;36' grep --color=always 'fox' ESC[03;36mESC[KThe quick brown ESC[01;36mESC[KfoxESC[mESC[K jumps over the lazy dogESC[mESC[K The issue is that the current colour isn't tracked, it is just reset with ESC[m. It would be nice if it were able to be tracked. Yes, it is more difficult to code, but I think it would be useful when highlighting a coloured textual document.
Paul Eggert <eggert <at> cs.ucla.edu>
to control <at> debbugs.gnu.org.
(2020年1月01日 07:38:02 GMT) Full text and rfc822 format available.
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.