bug-grep
[Top][All Lists]
Advanced

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

[bug-grep] Re: [patch #3644] --initial-tab and 3 newly colorized items


From: Charles Levert
Subject: [bug-grep] Re: [patch #3644] --initial-tab and 3 newly colorized items
Date: Wed, 26 Jan 2005 15:10:15 -0500
User-agent: Mutt/1.4.1i

* On Wednesday 2005-01-26 at 16:46:43 +0100, Stepan Kasal wrote:
> 
> I thought about it a lot.  I also asked a friend of mine, whose opinion
> I value high.  (His comment on -T was that it could be useful for visually
> impaired people using Braille terminal.)

I didn't envision that.  Nice.

> With the new colouring features, I understand that if we can colour
> matches we should be able to colour other information, too.
> I had an idea of config file, where one could specify other strings, not
> only "\e[%sm"--but I think it would be an overkill and I like tour solution
> now.

The only use of an even more configurable solution would have been for
terminals that colorize (and set attributes) using some method other
than SGR ("\33[%sm").  I assume not many of these are in use.

> Regarding the \e[K issue.  I fail to understand it fully,

I just added a script to patch #3644 to help study and understand this
(which was originally reported in bug #11022).  Run the script from the
top of an 80-column terminal, then from the bottom.  I didn't attach
it to this email because I am not sure if the web archives would carry
it properly.

  <https://savannah.gnu.org/patch/download.php?item_id=3644&item_file_id=4097>

> but what would be
> ``expensive'' on the solution that sgr_end would be \e[m\e[K (in other
> words, `cl' would be hardcoded)?

It's not expensive in term of the 3 characters that are sent.  But to be
on the safe side, I assumed that not only it could be expensive for a
slow terminal to perform, but more importantly, some terminals may not
even support EL (Erase in Line, "\33[K") at all.  (So, don't use "cl"
in GREP_COLORS when your terminal doesn't support EL, and don't use
"--color" either when your terminal doesn't support SGR.)




reply via email to

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