bug-grep
[Top][All Lists]
Advanced

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

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


From: Simon Josefsson
Subject: bug#57604: [ef]grep usage -> POSIXLY_CORRECT?
Date: Wed, 07 Sep 2022 09:55:24 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/27.1 (gnu/linux)

Karl Berry <karl@freefriends.org> writes:

> But, whatever. 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.
>
>     https://bugs.gnu.org/49996
>
> I'm unconvinced. What Simon's bug report says is "hey, why not deprecate
> [ef]grep because it's time". Well, IMHO it's not time, and will never be
> time, and "deprecation" merely means "cause trouble for users for no
> real reason". My "pet issue" is the exact opposite of Simon's ...
>
> Without some way to turn off those warnings, GNU [ef]grep become
> unusable without editing to remove the comment. It is completely
> infeasible, not to mention a tremendous waste of time, to edit
> everywhere on my systems that use them, after 40 years of historical
> usage.
>
> I'm not saying scripts intended to be portable should not be changed (as
> we know, they have had to be, because POSIX forced it). But all the
> scripts in the world which are *not* needed to be portable don't need to
> be changed. They just need to keep working and not be randomly broken by
> outside forces.
>
> [ef]grep are fundamental names for the utility. Please reconsider. -k

I can understand your frustration, and maybe it would have been a
simpler solution to undeprecate the tools in documentation and have them
be official GNU-enhancements as they de-facto has been for the past 20+
years.  My pet issue was the inconsistency between documentation and
reality, and I don't care strongly how to resolve it.

On the other hand, it seems your main problem here is the warning: and I
agree that is annoying and should be fixed.  There doesn't seem to be
any way to disable it now?  It would be nice to fix that.

I think the simplest way to fix that is to drop the tools rather than to
issue warnings: on some current systems (I think it was Alpine), there
is no egrep and fgrep any more, and dealing with non-existing tools
(discover the error, then use egrep -E or add a personal alias for
interactive use) is easier than dealing with annoying warnings that
cannot be disabled.

/Simon

Attachment: signature.asc
Description: PGP signature


reply via email to

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