bug-gnu-utils
[Top][All Lists]
Advanced

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

Re: BUG: grep --color -i


From: Benno Schulenberg
Subject: Re: BUG: grep --color -i
Date: Sat, 27 May 2006 11:45:54 +0200
User-agent: KMail/1.9.1

Eric Blake wrote:
> I recall having seen cases where the color sequences emitted by
> grep conflict with the capabilities of a terminal; for example,
> if a color start occurs before but the end occurs after text has
> wrapped around a line, some terminals refuse to color that
> sequence of text.

This was probably bug #11022 (fixed in CVS):
https://savannah.gnu.org/bugs/?func=detailitem&item_id=11022

> But in trying to reproduce that, I found that 
> I could make grep go into an infinite loop!

The CVS version does okay:

$ echo 
looooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooooonnnnnnnnnnnnnnnnnng
 | 
    src/grep -i --color=always 'n*' | od -tx1z -Ax

000000 6c 6f 6f 6f 6f 6f 6f 6f 6f 6f 6f 6f 6f 6f 6f 6f  >looooooooooooooo<
000010 6f 6f 6f 6f 6f 6f 6f 6f 6f 6f 6f 6f 6f 6f 6f 6f  >oooooooooooooooo<
*
000040 6f 6f 1b 5b 30 31 3b 33 31 6d 1b 5b 4b 6e 6e 6e  >oo.[01;31m.[Knnn<
000050 6e 6e 6e 6e 6e 6e 6e 6e 6e 6e 6e 6e 6e 6e 6e 1b  >nnnnnnnnnnnnnnn.<
000060 5b 6d 1b 5b 4b 67 0a                             >[m.[Kg.<
000067

Benno




reply via email to

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