[Top][All Lists]

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

Re: grep: default file if -r is used

From: Stepan Kasal
Subject: Re: grep: default file if -r is used
Date: Fri, 11 Jun 2004 10:59:24 +0200
User-agent: Mutt/1.4.1i


On Fri, Jun 11, 2004 at 10:09:43AM +0200, Koblinger Egmont wrote:
> Manual would grow about 2%, maybe 5. Who cares?

that's not what I meant, but let it be...

> Just a side note about compatibility, [...]

I understand your point.  So, we can afford _some_ incompatibility.

> What if '-r' remains the same and '-R' has the new behaviour?

This proposal isn't that bad.

> [...] (IMHO wasting two letters to the very same one-letter
> option wasn't a good idea anyway.)

Well, the idea was probably that many traditional utils use -R for
processing the whole tree (ls, chmod, chown, ...).

> (You'll hate this one but I ask: maybe '-r' would default to '.' only if
> stdin happens to be a terminal... this way old scripts keep on working...
> Okay, forget it if you don't like it, it _is_ ugly.)

Well, I won't say it isn't ugly, but I'm going to seriously consider this.

gzip already "refuses to write/read compressed data to/from a terminal"
And it is GNU software.

grep's --colour=auto option already tries to guess whether it writes to
a terminal or not.

So I could just put that autodetection in and wait for complaints.
Paul, Paul, Karl--would any of you object?

Yours ugly,

PS: Don't write any patch, I'd like to clean up the main processing
loop first.

reply via email to

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