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

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

grep: default file if -r is used


From: Koblinger Egmont
Subject: grep: default file if -r is used
Date: Thu, 10 Jun 2004 15:59:06 +0200 (CEST)

Hi,

I quite often type grep to look for a particular string in a huge
directory tree, e.g. a source code. So I type something like this:
grep -rl pattern .

I found that in many cases I forget to type that '.' at the end.
Especially since the pattern is often copy-pasted from the mouse, I have
to put my fingers properly back on the keyboard to press Space+Dot+Enter
instead of just hitting the keypad Enter next to the mouse (or maybe the
seletion buffer already contains a newline).

And then grep starts to recursively read stdin... But hey, this doesn't
make too much sense. It's quite obvious IMHO that if I told "-r" to grep
then I want it to scan a directory, most likely the current one if I
forgot to tell it.

So my feature request is: if "-r" or an equivalent option is given to
grep, and the file argument is omitted, it should default to "." rather
than stdin.


thx,

Egmont




reply via email to

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