grep --color=tty
While I am using grep(1) with colours for some time now (it's soooo helpful), I did not know about the =tty
mode. Ulrich explains:
Using tty as the color mode mean that if I pipe the output into another program there won't be any color escape sequences added which could irritate those programs.Strangely enough, the manpage (from GNU grep 2.5.1-cvs) does not mention this mode. Btw, instead of just adding aliases, GNU grep honors the GREP_OPTIONS variable.