While checking out what #75806[1] was about I realized that there is
some subtle unexpected behavior going on when coloring whitespace
characters. Since they are non-printable/invisible the default
GREP_COLORS='ms=1;31' is essentially a nop which mostly matters when
they are the *only* match(es), like trailing spaces (as in [1]).
One gets a match but no color which had me scratching my
head for a while.

Long story short, I propose changing the default to include both the
reverse/standout and underline capabilities. I say both because,
according to [2], they are somewhat obscure and not supported
everywhere. But chances are that at least one of the two is available,
one would hope. Are there any ill effects when sending unsupported
escape sequences? Because if not the experience out of the box would be
improved; if support is lacking, no harm done.

Thanks for your consideration,
PW

[1] https://lists.gnu.org/archive/html/bug-grep/2025-01/msg00014.html
[2] https://en.wikipedia.org/wiki/ANSI_escape_code



Reply via email to