bug-gnu-utils
[Top][All Lists]
Advanced

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

Re: Some grep 2.5e issues


From: Paul Eggert
Subject: Re: Some grep 2.5e issues
Date: Sun, 13 May 2001 09:47:40 -0700 (PDT)

> From: Bernhard Rosenkraenzer <address@hidden>
> Date: Sun, 13 May 2001 16:22:35 +0200 (CEST)
> 
> 2. Since some people will definitely alias grep="grep --color" sooner or
>    later (and start wondering why the output of "grep foo /bar |less"
>    looks weird), I think --color should be handled the way it is in ls:
>    Allow an optional parameter (--color={never,always,auto}) and default
>    to --color=auto if the user specifies just "--color".

Presumably you meant to write "default to --color=always", since that's
what GNU ls does, and that's what your proposed patch does.  But then
I'm puzzled by your first sentence, since it clearly implies that you
wanted your patch to default to --color=auto.

At any rate, the two programs should agree.  I don't think it's too
much to expect users to write "--color=auto" in their alias files.

Looking at your proposed patch in more detail, I notice that you're
not using the GNU coding style for indentation.  Could you please use
that in future patches?  It will save the maintainers some work.

Also, the patch uses "strcasecmp", but the rest of GNU grep uses
"strcmp" in the same situation, and this change should be consistent
with the rest of the code.

Also, the patch makes a special exception for the case where
TERM=dumb.  GNU ls doesn't make this exception, and I don't think GNU
grep should either.

Finally, the proposed Texinfo documentation doesn't explain what
--color=never etc. actually mean.



reply via email to

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