[ To bug-grep readers: This was sent to me by private email. I am
citing it whole here as I don't believe any of it is secret. ]
* On Sunday 2005-11-13 at 22:21:29 -0800, Dan Nicolaescu wrote:
> Hi!
>
> May I suggest an addition to the GREP_COLORS documentation?
>
> Currently the GREP_COLORS support works just fine on terminals capable
> of displaying 256 colors. It would be nice to have some documentation
> about this.
This really belongs in each specific terminal's
documentation, such as xterm's ctlseqs.ms.
However, I have added something about this you
might like. See my latest posts in the
"[patch] selected/context colors" thread of the
bug-grep mailing list. The current CVS revision
of "grep.texi", which is older, simply used to
refer the reader to the terminal's documentation
about SGR ("\33[m").
> For example something like:
> The GREP_COLORS support can be used on terminals that support 256
> colors. For example specifying mt=48;5;40;38;5;190 means to display
> the match with as a background the color 40 and as a foreground the
> color 190.
>
> I am not sure if there any documentation for the 256 colors used by
> xterm. The script 256colors2.pl in the xterm distribution can be used
> to display all the 256 colors.
In <ftp://invisible-island.net/xterm/xterm-207.tgz>,
file "xterm-207/ctlseqs.ms":
If 88- or 256-color support is compiled, the following apply.
\*(Ps = \*3\*8 ; \*5 ; \*(Ps \(-> Set foreground color to the second \*(Ps
\*(Ps = \*4\*8 ; \*5 ; \*(Ps \(-> Set background color to the second \*(Ps
Use
groff -Tascii -ms xterm-207/ctlseqs.ms | less -sR
groff -Tps -ms xterm-207/ctlseqs.ms | gv -
to view this in its rendered forms.
> IMHO GREP_COLORS on a 256 colors terminal can be used to display some
> very attractive grep results.
>
> Thanks
>
> --dan