On 08/21/2013 10:54 PM, Linda Walsh wrote:

> Ok, thank you for "sharing", but doesn't '-E' mean egrep pattern syntax?
> That even, '-E' fails, telling the user that they can only
> use the syntax they are specifying seems "abusive".  That
> other options in grep DO take the 'last' option, but the
> syntax options are disallowed, is inconsistent, unuseful and
> creates breakages in existing scripts that don't know they
> should clear GREP_OPTIONS in order for egrep and fgrep to
> function correctly.

Anyone that sets -E via GREP_OPTIONS is already breaking their own
system, and we have no sympathy for their dumb action.  An explicit
error is better than silently making a multitude of scripts misbehave.
In my opinion, GREP_OPTIONS is a mistake - it's ONLY useful and safe
purpose is to do automatic coloring when used from a terminal, but that
can be done with an alias or shell function, and could have been done
with an explicitly-named GREP_COLOR instead of GREP_OPTIONS - if only we
could go back 20+ years and design it that way to begin with.

> Could 15127 also be re-opened as it was closed unilaterally in the
> presence of obvious bugs.  Thanks...

These are not obvious bugs.  As POSIX permits both behaviors (mutually
exclusive options giving an error, vs. last option wins), it is merely a
quality of implementation question, which crosses the line into
subjective rather than objective.

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

Attachment: signature.asc
Description: OpenPGP digital signature

Reply via email to