help-hurd
[Top][All Lists]
Advanced

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

Re: Grep --directories option


From: Paul Eggert
Subject: Re: Grep --directories option
Date: Fri, 30 May 2003 13:58:14 -0700

> Date: Fri, 30 May 2003 14:01:31 +0200
> From: Stepan Kasal <kasal@math.cas.cz>

> > How to differentiate these systems
> > I don't know, maybe a "mkdir foo; cat foo"?
> > Or just using host_os
> 
> Thank you very much.  I think this is the best solution....
> I hope that no one minds that the default depends on the OS.

I mind!  grep should behave the same way on all platforms; otherwise
it's a portability (and compilation and documentation) nightmare.

Here's a simple counterproposal:

* Change the default to be --directories='recurse'.

This is simple and portable, and it's more useful than the current
behavior.  The new behavior would conform to POSIX, since POSIX
requires that the input files must be text files; directories are not
text files, so GNU grep can do what it likes with them.

Having the default be --directories='skip' is less useful, and would
confuse new users more.  Normally if a user wants to grep a directory,
they are probably thinking of the files under the directory, not the
directory itself.




reply via email to

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