GNU bug report logs - #26205
Unhappy with deprecating GREP_OPTIONS

Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.

Package: grep; Reported by: Thomas G√ľttler <guettliml@HIDDEN>; Keywords: wontfix; dated Tue, 21 Mar 2017 15:40:01 UTC; Maintainer for grep is bug-grep@HIDDEN.
Added tag(s) wontfix. Request was from Paul Eggert <eggert@HIDDEN> to control <at> debbugs.gnu.org. Full text available.

Message received at 26205 <at> debbugs.gnu.org:


Received: (at 26205) by debbugs.gnu.org; 21 Mar 2017 16:43:53 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Tue Mar 21 12:43:53 2017
Received: from localhost ([127.0.0.1]:38193 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1cqMsz-0000M6-D9
	for submit <at> debbugs.gnu.org; Tue, 21 Mar 2017 12:43:53 -0400
Received: from zimbra.cs.ucla.edu ([131.179.128.68]:38532)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <eggert@HIDDEN>) id 1cqMsw-0000Lt-VF
 for 26205 <at> debbugs.gnu.org; Tue, 21 Mar 2017 12:43:51 -0400
Received: from localhost (localhost [127.0.0.1])
 by zimbra.cs.ucla.edu (Postfix) with ESMTP id CE2A61600A1;
 Tue, 21 Mar 2017 09:43:43 -0700 (PDT)
Received: from zimbra.cs.ucla.edu ([127.0.0.1])
 by localhost (zimbra.cs.ucla.edu [127.0.0.1]) (amavisd-new, port 10032)
 with ESMTP id OmHTfHZknHel; Tue, 21 Mar 2017 09:43:43 -0700 (PDT)
Received: from localhost (localhost [127.0.0.1])
 by zimbra.cs.ucla.edu (Postfix) with ESMTP id 27E4A1600A2;
 Tue, 21 Mar 2017 09:43:43 -0700 (PDT)
X-Virus-Scanned: amavisd-new at zimbra.cs.ucla.edu
Received: from zimbra.cs.ucla.edu ([127.0.0.1])
 by localhost (zimbra.cs.ucla.edu [127.0.0.1]) (amavisd-new, port 10026)
 with ESMTP id ApKnapCv-a41; Tue, 21 Mar 2017 09:43:43 -0700 (PDT)
Received: from Penguin.CS.UCLA.EDU (Penguin.CS.UCLA.EDU [131.179.64.200])
 by zimbra.cs.ucla.edu (Postfix) with ESMTPSA id 118761600A1;
 Tue, 21 Mar 2017 09:43:43 -0700 (PDT)
Subject: Re: bug#26205: Unhappy with deprecating GREP_OPTIONS
To: =?UTF-8?Q?Thomas_G=c3=bcttler?= <guettliml@HIDDEN>,
 26205 <at> debbugs.gnu.org
References: <7e2f2588-a61f-4eda-4323-8d053e6a1814@HIDDEN>
From: Paul Eggert <eggert@HIDDEN>
Organization: UCLA Computer Science Department
Message-ID: <fd9788f4-b669-201b-2ca1-ec544898f689@HIDDEN>
Date: Tue, 21 Mar 2017 09:43:40 -0700
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101
 Thunderbird/45.8.0
MIME-Version: 1.0
In-Reply-To: <7e2f2588-a61f-4eda-4323-8d053e6a1814@HIDDEN>
Content-Type: text/plain; charset=utf-8; format=flowed
Content-Transfer-Encoding: quoted-printable
X-Spam-Score: -0.0 (/)
X-Debbugs-Envelope-To: 26205
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -0.0 (/)

On 03/21/2017 08:39 AM, Thomas G=C3=BCttler wrote:
> Why is GREP_OPTIONS deprecated?=20

The main reason is that it breaks shell scripts. Scripts generally=20
expect 'grep' to behave as specified in POSIX and as implemented via=20
traditional 'grep' implementations. GREP_OPTIONS breaks this.

Some shell scripts work around the problem by explicitly unsetting=20
GREP_OPTIONS before they call 'grep'. However, most scripts don't, I=20
expect because their authors are not generally aware of this=20
compatibility issue. So in practice the convenience of GREP_OPTIONS can=20
be more trouble than it's worth.

>  * Strategy 4: Write a simple wrapper script. No, I think this is too=20
> dirty and makes more trouble than it solves.
Why is it dirty? What trouble does it cause, other than the trouble=20
GREP_OPTIONS causes?





Information forwarded to bug-grep@HIDDEN:
bug#26205; Package grep. Full text available.

Message received at 26205 <at> debbugs.gnu.org:


Received: (at 26205) by debbugs.gnu.org; 21 Mar 2017 16:05:31 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Tue Mar 21 12:05:31 2017
Received: from localhost ([127.0.0.1]:38167 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1cqMHr-0007tc-52
	for submit <at> debbugs.gnu.org; Tue, 21 Mar 2017 12:05:31 -0400
Received: from mx1.redhat.com ([209.132.183.28]:41774)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <eblake@HIDDEN>) id 1cqMHo-0007tL-Pj
 for 26205 <at> debbugs.gnu.org; Tue, 21 Mar 2017 12:05:29 -0400
Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com
 [10.5.11.13])
 (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits))
 (No client certificate requested)
 by mx1.redhat.com (Postfix) with ESMTPS id A8E387573B;
 Tue, 21 Mar 2017 16:05:23 +0000 (UTC)
DMARC-Filter: OpenDMARC Filter v1.3.2 mx1.redhat.com A8E387573B
Authentication-Results: ext-mx01.extmail.prod.ext.phx2.redhat.com;
 dmarc=none (p=none dis=none) header.from=redhat.com
Authentication-Results: ext-mx01.extmail.prod.ext.phx2.redhat.com;
 spf=pass smtp.mailfrom=eblake@HIDDEN
DKIM-Filter: OpenDKIM Filter v2.11.0 mx1.redhat.com A8E387573B
Received: from [10.10.121.124] (ovpn-121-124.rdu2.redhat.com [10.10.121.124])
 by smtp.corp.redhat.com (Postfix) with ESMTP id 0728117AAC;
 Tue, 21 Mar 2017 16:05:22 +0000 (UTC)
Subject: Re: bug#26205: Unhappy with deprecating GREP_OPTIONS
To: =?UTF-8?Q?Thomas_G=c3=bcttler?= <guettliml@HIDDEN>,
 26205 <at> debbugs.gnu.org
References: <7e2f2588-a61f-4eda-4323-8d053e6a1814@HIDDEN>
From: Eric Blake <eblake@HIDDEN>
Openpgp: url=http://people.redhat.com/eblake/eblake.gpg
Organization: Red Hat, Inc.
Message-ID: <1efe9c8e-5330-1497-5d6d-b344399a4e58@HIDDEN>
Date: Tue, 21 Mar 2017 11:05:21 -0500
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101
 Thunderbird/45.8.0
MIME-Version: 1.0
In-Reply-To: <7e2f2588-a61f-4eda-4323-8d053e6a1814@HIDDEN>
Content-Type: multipart/signed; micalg=pgp-sha256;
 protocol="application/pgp-signature";
 boundary="jTStKdJiL0MnL13VNiFoA2t4KK3LE9ogf"
X-Scanned-By: MIMEDefang 2.79 on 10.5.11.13
X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16
 (mx1.redhat.com [10.5.110.25]); Tue, 21 Mar 2017 16:05:23 +0000 (UTC)
X-Spam-Score: -5.0 (-----)
X-Debbugs-Envelope-To: 26205
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -5.0 (-----)

This is an OpenPGP/MIME signed message (RFC 4880 and 3156)
--jTStKdJiL0MnL13VNiFoA2t4KK3LE9ogf
Content-Type: multipart/mixed; boundary="XVfVH42iR3SjGueAGg4X3kJKSICDQt8CK";
 protected-headers="v1"
From: Eric Blake <eblake@HIDDEN>
To: =?UTF-8?Q?Thomas_G=c3=bcttler?= <guettliml@HIDDEN>,
 26205 <at> debbugs.gnu.org
Message-ID: <1efe9c8e-5330-1497-5d6d-b344399a4e58@HIDDEN>
Subject: Re: bug#26205: Unhappy with deprecating GREP_OPTIONS
References: <7e2f2588-a61f-4eda-4323-8d053e6a1814@HIDDEN>
In-Reply-To: <7e2f2588-a61f-4eda-4323-8d053e6a1814@HIDDEN>

--XVfVH42iR3SjGueAGg4X3kJKSICDQt8CK
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: quoted-printable

On 03/21/2017 10:39 AM, Thomas G=C3=BCttler wrote:

>=20
>  * Strategy 1: GREP_OPTIONS. But this is deprecated. See
> http://www.gnu.org/software/grep/manual/html_node/Environment-Variables=
=2Ehtml
>=20
>  * 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.

It can if you teach it to (assuming you are using a sh-like shell):

alias xargs=3D'xargs '

(I can't help you if you are using a csh-like shell)

>  * Strategy 4: Write a simple wrapper script. No, I think this is too
> dirty and makes more trouble than it solves.

What trouble does it cause? This our preferred recommendation, by the way=
=2E

>  * Strategy 5: patch the source code  - No

Why not? It's open source, so you are free to do so, for your local setup=
=2E

>  * Strategy 6: Contact grep developers, ask for a replacement of
> GREP_OPTIONS

Which you've done. But it won't help, because we made a conscious
decision to kill environment variables that have the chance of breaking
scripts, and we are unlikely to be persuaded to change our minds.


> Why is GREP_OPTIONS deprecated?

Because it has the tendency to break unsuspecting scripts that don't
sanitize GREP_OPTIONS out of their environment.  Environment variables
that change default output are very dangerous.  Environment variables
that only modify behavior that has to be opted into (like GREP_COLORS)
are not as bad, but once you are explicitly opting into something, a
wrapper script is a lot more direct than a wrapper script + an
environment variable.

>=20
> I guess this can do confusing things if you exclude directories via thi=
s
> environment variable.

Yes, that was one of the things known to break scripts.

>=20
> But setting color=3Dauto looks like something which does not do harm.

You're right that 'color=3Dauto' tends to not break scripts, but
'color=3Dalways' does, and it gets rather hard, rather fast, if you try t=
o
special-case WHICH aspects of GREP_OPTIONS are safe, vs. just a blanket
statement that GREP_OPTIONS is in general unsafe.

--=20
Eric Blake   eblake redhat com    +1-919-301-3266
Libvirt virtualization library http://libvirt.org


--XVfVH42iR3SjGueAGg4X3kJKSICDQt8CK--

--jTStKdJiL0MnL13VNiFoA2t4KK3LE9ogf
Content-Type: application/pgp-signature; name="signature.asc"
Content-Description: OpenPGP digital signature
Content-Disposition: attachment; filename="signature.asc"

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2
Comment: Public key at http://people.redhat.com/eblake/eblake.gpg
Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/

iQEcBAEBCAAGBQJY0U9BAAoJEKeha0olJ0NqZG0H/RH/igrQV0DpiyB7q9yCcnFd
KlM3/fyd8mm3ahMLUQgauhh7b0r6vmp0N0qBL8zmUgXZ5E7UCZEHbQMGv6F4htPO
ta9rblTVeXlYQnGIbU67Khi61Eo7kJsyD5fpxBYb4hRIDgiHLVAEAcX2F2gMeNlB
jfIMndbrZJ/lF0DFTmkMeBitT55VLnNr7KYOcFS/92L7HsvE2eVkY1QlHCcnTnJ3
DTvRpcRqf460l2YW3n9negcVOuiHg+fTyrymO1+Ongc70HqcxvMkR7Y6AfsaplSy
41Re9Y212FwFvZxEmdbXEvsQu20yQD5UbqFgjoX1oMYBpb+8zE15jBNaSZycqAs=
=uvDk
-----END PGP SIGNATURE-----

--jTStKdJiL0MnL13VNiFoA2t4KK3LE9ogf--




Information forwarded to bug-grep@HIDDEN:
bug#26205; Package grep. Full text available.

Message received at 26205 <at> debbugs.gnu.org:


Received: (at 26205) by debbugs.gnu.org; 21 Mar 2017 15:55:58 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Tue Mar 21 11:55:58 2017
Received: from localhost ([127.0.0.1]:38155 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1cqM8b-0007eZ-Nd
	for submit <at> debbugs.gnu.org; Tue, 21 Mar 2017 11:55:57 -0400
Received: from freefriends.org ([96.88.95.60]:44802)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <arnold@HIDDEN>) id 1cqM8Z-0007eR-VE
 for 26205 <at> debbugs.gnu.org; Tue, 21 Mar 2017 11:55:56 -0400
X-Envelope-From: arnold@HIDDEN
Received: from freefriends.org (localhost [127.0.0.1])
 by freefriends.org (8.14.9/8.14.9) with ESMTP id v2LFtsxM028750;
 Tue, 21 Mar 2017 09:55:55 -0600
Received: (from arnold@localhost)
 by freefriends.org (8.14.9/8.14.9/submit) id v2LFtsDB028749;
 Tue, 21 Mar 2017 15:55:54 GMT
From: arnold@HIDDEN
Message-Id: <201703211555.v2LFtsDB028749@HIDDEN>
X-Authentication-Warning: frenzy.freefriends.org: arnold set sender to
 arnold@HIDDEN using -f
Date: Tue, 21 Mar 2017 09:55:54 -0600
To: guettliml@HIDDEN, 26205 <at> debbugs.gnu.org
Subject: Re: bug#26205: Unhappy with deprecating GREP_OPTIONS
References: <7e2f2588-a61f-4eda-4323-8d053e6a1814@HIDDEN>
In-Reply-To: <7e2f2588-a61f-4eda-4323-8d053e6a1814@HIDDEN>
User-Agent: Heirloom mailx 12.4 7/29/08
MIME-Version: 1.0
Content-Type: text/plain; charset=iso-8859-1
Content-Transfer-Encoding: 8bit
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 26205
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -2.3 (--)

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@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/
>
>
>
>




Information forwarded to bug-grep@HIDDEN:
bug#26205; Package grep. Full text available.

Message received at submit <at> debbugs.gnu.org:


Received: (at submit) by debbugs.gnu.org; 21 Mar 2017 15:39:41 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Tue Mar 21 11:39:41 2017
Received: from localhost ([127.0.0.1]:38135 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1cqLsr-0007G1-CX
	for submit <at> debbugs.gnu.org; Tue, 21 Mar 2017 11:39:41 -0400
Received: from eggs.gnu.org ([208.118.235.92]:42721)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <guettliml@HIDDEN>) id 1cqLsp-0007Fm-WF
 for submit <at> debbugs.gnu.org; Tue, 21 Mar 2017 11:39:40 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
 (envelope-from <guettliml@HIDDEN>) id 1cqLsj-0004eO-Qe
 for submit <at> debbugs.gnu.org; Tue, 21 Mar 2017 11:39:34 -0400
X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org
X-Spam-Level: 
X-Spam-Status: No, score=0.8 required=5.0 tests=BAYES_50 autolearn=disabled
 version=3.3.2
Received: from lists.gnu.org ([2001:4830:134:3::11]:38607)
 by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32)
 (Exim 4.71) (envelope-from <guettliml@HIDDEN>)
 id 1cqLsj-0004eD-Ni
 for submit <at> debbugs.gnu.org; Tue, 21 Mar 2017 11:39:33 -0400
Received: from eggs.gnu.org ([2001:4830:134:3::10]:33682)
 by lists.gnu.org with esmtp (Exim 4.71)
 (envelope-from <guettliml@HIDDEN>) id 1cqLsi-0005Ci-G8
 for bug-grep@HIDDEN; Tue, 21 Mar 2017 11:39:33 -0400
Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71)
 (envelope-from <guettliml@HIDDEN>) id 1cqLsc-0004Z5-Os
 for bug-grep@HIDDEN; Tue, 21 Mar 2017 11:39:32 -0400
Received: from hz1.yz.to ([178.63.61.147]:56184)
 by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32)
 (Exim 4.71) (envelope-from <guettliml@HIDDEN>)
 id 1cqLsc-0004XE-JB
 for bug-grep@HIDDEN; Tue, 21 Mar 2017 11:39:26 -0400
Received: from [192.168.178.45] (i5E86D4CF.versanet.de [94.134.212.207])
 by hz1.yz.to (Postfix) with ESMTPSA id 5C0E68198ED8
 for <bug-grep@HIDDEN>; Tue, 21 Mar 2017 16:39:17 +0100 (CET)
To: bug-grep@HIDDEN
From: =?UTF-8?Q?Thomas_G=c3=bcttler?= <guettliml@HIDDEN>
Subject: Unhappy with deprecating GREP_OPTIONS
Message-ID: <7e2f2588-a61f-4eda-4323-8d053e6a1814@HIDDEN>
Date: Tue, 21 Mar 2017 16:39:16 +0100
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:49.0) Gecko/20100101
 Thunderbird/49.0
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8; format=flowed
Content-Transfer-Encoding: quoted-printable
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic]
 [fuzzy]
X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x
X-Received-From: 2001:4830:134:3::11
X-Spam-Score: -4.1 (----)
X-Debbugs-Envelope-To: submit
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -4.1 (----)

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-gr=
ep-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`, si=
nce xargs does not evaluate aliases.
  * Strategy 4: Write a simple wrapper script. No, I think this is too di=
rty 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_OP=
TIONS
  * 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=3Dauto 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=C3=BCttler


--=20
http://www.thomas-guettler.de/





Acknowledgement sent to Thomas G√ľttler <guettliml@HIDDEN>:
New bug report received and forwarded. Copy sent to bug-grep@HIDDEN. Full text available.
Report forwarded to bug-grep@HIDDEN:
bug#26205; Package grep. Full text available.
Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.
Last modified: Wed, 21 Jun 2017 21:45:01 UTC

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