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

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

Re: grep patch


From: Alain Magloire
Subject: Re: grep patch
Date: Fri, 18 Jan 2002 09:34:04 -0500 (EST)

> 
> On Thu, 17 Jan 2002, Stepan Koltsov wrote:
> 
> > This is diff, that add option --fake-filename= for grep 2.5f, it prints
> > specified filename instead of real.
> 
> Thanks. I'm committing a variant of your patch to CVS.
> 
> To the people claiming it's not necessary and people should just use sed:
> Yes, people can just use sed, but having the feature doesn't hurt (it's
> not like it requires 10 kB of code that will bloat the whole system), and
> piping output to sed automatically disables some features (--color).


8-)
I think, Paul's point is that we should be conservative in the approach
of adding features because they carry an hidden costs. 

> I think the option (which I've renamed to --label for compatibility with
> diff) makes sense e.g. for use in zgrep, bzgrep and the likes.

IMHO, it is still not clear enough and should be make clearer that
the option applies only to stdin.  For example, how does this
behave:

# grep --label="foo"  bar file1 fil2 file3

Does it replace filenames: file1, file2, file3 with "foo" 





reply via email to

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