bug-grep
[Top][All Lists]
Advanced

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

bug#26205: Unhappy with deprecating GREP_OPTIONS


From: arnold
Subject: bug#26205: Unhappy with deprecating GREP_OPTIONS
Date: Tue, 21 Mar 2017 09:55:54 -0600
User-agent: Heirloom mailx 12.4 7/29/08

Create a shell script named grep with

        /usr/bin/grep --color "$@"

in it, and put it in a directory in your search path that is
found before the standard grep.

HTH,

Arnold

Thomas Güttler <address@hidden> wrote:

> I am not happy with GREP_OPTIONS being deprecated.
>
> I asked here for help, but received no solution I like:
>
> http://unix.stackexchange.com/questions/351083/colored-grep-output-not-grep-options-not-alias
>
> Here the question:
>
> I want colored output of `grep`.
>
> .... But
>
>   * Strategy 1: GREP_OPTIONS. But this is deprecated. See 
> http://www.gnu.org/software/grep/manual/html_node/Environment-Variables.html
>   * Stragegy 2: GREP_COLORS look like a solution at the first sight, but this 
> does something different.
>   * Strategy 3: alias. This does not work for `find ... | xargs grep`, since 
> xargs does not evaluate aliases.
>   * Strategy 4: Write a simple wrapper script. No, I think this is too dirty 
> and makes more trouble than it solves.
>   * Strategy 5: patch the source code  - No
>   * Strategy 6: Contact grep developers, ask for a replacement of GREP_OPTIONS
>   * Strategy NICE-and-EASY: ... this is missing. I have no clue.
>
> How to solve this?
>
>
> Now I follow Strategy 6.
>
> Why is GREP_OPTIONS deprecated?
>
> I guess this can do confusing things if you exclude directories via this 
> environment variable.
>
> But setting color=auto looks like something which does not do harm. May be I 
> am too naive. Then please tell me.
>
> What do you think?
>
> Regards,
>    Thomas Güttler
>
>
> -- 
> http://www.thomas-guettler.de/
>
>
>
>





reply via email to

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