FS#43421 - [gnome-terminal] "grep --color" eats character at terminal boundary.
Attached to Project:
Arch Linux
Opened by Chunwei Chen (tuxoko) - Monday, 12 January 2015, 15:22 GMT
Last edited by Jan de Groot (JGC) - Sunday, 05 April 2015, 10:47 GMT
Opened by Chunwei Chen (tuxoko) - Monday, 12 January 2015, 15:22 GMT
Last edited by Jan de Groot (JGC) - Sunday, 05 April 2015, 10:47 GMT
|
Details
Description:
"grep --color" eats character at terminal boundary. Additional info: grep 2.21-1 gnome-terminal 3.14.2-1 Steps to reproduce: For example, doing "ps aux | grep system" In nocolor.png, you can see that there are several lines wrap at "system". In color.png, adding --color causes the last character 'm' to disappear. In other two pngs, you can see that grepping "syste" or "systemd" are fine. Another example, I shrink the terminal width by two, so those lines wrap at "syst" Now in emd.png, "ps aux | grep emd" also causes the last character 't' to disappear. So basically, "grep --color" will eat character if your keyword happens to be just before or just after the line wrap. |
This task depends upon
Doing "ps aux | grep --color=always system > output.txt"
And the output file seems fine.
https://bugzilla.gnome.org/show_bug.cgi?id=740789
https://bugzilla.redhat.com/show_bug.cgi?id=1168182
http://savannah.gnu.org/bugs/?36831
Future gnome-terminal-3.16 (actually vte-0.40) will intentionally deviate from xterm so that this doesn't happen.
Until then a workaround is: export GREP_COLORS=ne
The vte fix is here: https://git.gnome.org/browse/vte/commit/?id=916964e
And I confirmed that the issue has been fixed.
Thanks.