[Top][All Lists]

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

bug#57604: [ef]grep usage -> POSIXLY_CORRECT?

From: Paul Eggert
Subject: bug#57604: [ef]grep usage -> POSIXLY_CORRECT?
Date: Tue, 6 Sep 2022 15:52:13 -0500
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.11.0

On 9/6/22 15:33, Karl Berry wrote:
Since it bothers you to use POSIXLY_CORRECT, let's invent
some other envvar that turns off the warning, like
will set it and life can go on.

Python has PYTHONWARNINGS. I suppose GNU Grep could have a GREP_WARNINGS variable that could suppress these diagnostics from egrep and fgrep, along with diagnostics like these:

$ grep '\Q' /dev/null
grep: warning: stray \ before Q
$ grep '[:alpha:]' /dev/null
grep: character class syntax is [[:space:]], not [:space:]

We've been moving away from environment variables like GREP_OPTIONS, though, for security reasons. Perhaps we should let others comment.

In the meantime you can implement egrep and fgrep the way you like, as shell scripts in your private bin directory, as this is something you'll need for grep 3.8 anyway. And once you have that simple workaround, maybe we won't need the complexity of GREP_WARNINGS.

reply via email to

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