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
- TTY-dependent GREP_OPTIONS Julius Werner
-