GNU bug report logs - #26205
Unhappy with deprecating GREP_OPTIONS

Previous Next

Package: grep;

Reported by: Thomas Güttler <guettliml <at> thomas-guettler.de>

Date: Tue, 21 Mar 2017 15:40:01 UTC

Severity: normal

Tags: wontfix

Done: Paul Eggert <eggert <at> cs.ucla.edu>

Bug is archived. No further changes may be made.

Full log


Message #8 received at 26205 <at> debbugs.gnu.org (full text, mbox):

From: arnold <at> skeeve.com
To: guettliml <at> thomas-guettler.de, 26205 <at> debbugs.gnu.org
Subject: Re: bug#26205: Unhappy with deprecating GREP_OPTIONS
Date: Tue, 21 Mar 2017 09:55:54 -0600
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 <guettliml <at> thomas-guettler.de> 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/
>
>
>
>




This bug report was last modified 2 years and 320 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.