bug-grep
[Top][All Lists]
Advanced

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

TTY-dependent GREP_OPTIONS


From: Julius Werner
Subject: TTY-dependent GREP_OPTIONS
Date: Sat, 07 Jul 2012 02:28:31 +0200
User-agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.6; rv:13.0) Gecko/20120614 Thunderbird/13.0.1

Hi,

I'm a big fan of GREP_OPTIONS - I usually use "--color=auto -n -r --exclude=*.svn-base" because it saves so much hassle in everyday use. However, as most of you are probably aware, this (especially -n) can seriously break scripts and makefiles that often don't expect it.

Have you ever considered changing the behavior of GREP_OPTIONS to only apply when the output is a terminal (similar to --color=auto)? I think this would reliably solve the problem and I can't think of a use case where one would actually want GREP_OPTIONS to apply to non-terminal outputs.

Alternatively, if you don't want to break backwards-compatibility, how about adding a new variable for this behavior? It's such a great convenience feature, but hardly useable in its current form because so many scripts rely on a unmodified grep.

Best regards,
Julius



reply via email to

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