On Wed, Apr 14, 2010 at 4:03 PM, Glenn Fowler <[email protected]> wrote:
>
> On Wed, 14 Apr 2010 15:46:56 +0200 Jennifer Pioch wrote:
>> 4. Add option -r to AST grep, in the binary, please and not a script wrapper.
>> I know this is against the "spirit of UNIX" and users should use
>> find/grep or tw/grep instead but grep -r has been very very very
>> popular with end users and every other modern (not calling Solaris
>> modern, but they soon use AST grep and Heirloom grep mat get it
>> quickly) grep implementation, including GNU grep, Mac grep and BSD
>> grep have it.
>
> this is a very slippery slope
> "but I only want 
> to-follow-symlinks/to-not-follow-symlinks/to-not-cross-filesystems/executables/non-executables/regular-files/regular-files-i-own..."
> and before you know it every -r command has glommed on a chunk of find
>
> for the simple case a 21st century user should use
>
>        set --globstar
>        grep **/*.[ch]
>        my_foo **
>
> and all *.[ch] under . will be grepped
>
> for too large an arg list use
>
>        command -x foo **-PATTERN
>
> for detailed filtering use tw
>
> *if* the only request for -r, and *just* -r, would be to add it to grep,
> I might be persuaded to do it

I agree with you that grep -r is an abomination. I would even agree
that we should take a time machine, travel back to 1996, hijack the
GNU hacker who invented -r, paint "I am a spy from Iran" on his
forehead and send him straight to Saddam Hussein.

Unfortunately time machines do not exist yet and many of the simple,
sporadic UNIX users all know about grep -r.
I verified this, I went to the cafeteria this morning and asked 5
random people from engineering how they search a tree of text files on
UNIX. They all *prefer* grep -r.

I think the ship has sailed and while grep -r is bad from a design
standpoint it's now common usage. I'd say: Please add -r to grep to
make the users happy. Even if it's dumb from the powerusers viewpoint.

Irek
_______________________________________________
ast-developers mailing list
[email protected]
https://mailman.research.att.com/mailman/listinfo/ast-developers

Reply via email to