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

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

Re: grep: default file if -r is used


From: Paul Eggert
Subject: Re: grep: default file if -r is used
Date: Fri, 11 Jun 2004 17:16:34 -0700
User-agent: Gnus/5.1006 (Gnus v5.10.6) Emacs/21.3 (gnu/linux)

Koblinger Egmont <address@hidden> writes:

> (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.)

That would contradict the GNU coding standards, which says that
programs should behave the same regardless of file type.  There are a
few exceptions to this rule, but I'd rather not add more exceptions.

The idea of having -R have the desired behavior makes sense, though,
with a new -d action to represent this.  I'd probably switch to using
-R myself, as it's a bit easier to type "grep -R foo" than "grep -r
foo .".

However, I'd like to ask for one more minor fillip: I'd like "grep -R
foo" to omit the leading "./" from file names in its output.




reply via email to

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