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

From: Paul Eggert <[email-masked]>
Date: Tue, 6 Sep 2022 15:52:13 -0500

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
> "PLEASE_LET_ME_USE_EFGREP_I_DONT_CARE_ABOUT_POSIX", and Arnold and I
> 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.