[Top][All Lists]

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

[patch #4354] add --no-recurse-symlinks feature

From: Charles Levert
Subject: [patch #4354] add --no-recurse-symlinks feature
Date: Fri, 26 Aug 2005 23:43:57 +0000
User-agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.10) Gecko/20050716 Firefox/1.0.6

Follow-up Comment #3, patch #4354 (project grep):

The find command already does not follow symbolic links by default, so that
the following pipeline can be used:

  find /usr/include -type f -print0 | xargs -0r grep -H lstat

instead of a hypothetically new

  grep -r --no-recurse-symlinks lstat /usr/include

Do we really need to duplicate all of find's expressiveness in grep?  If so,
then I have looked at the patch and have the following comments:

-- The new "--help" source code string line should use the same end-of-line
convention as its neighbors.

-- I think the patch is correct in not assigning a new single letter option
(among the few that are left) for this.

-- In the currently added code in grepdir() [please use "diff -pu"], I would
remove the redundant comment, unfold the if-condition on a single line and
remove the braces around that inner-if body.

-- Another possibility for option syntax would be to remain consistent with
--directories=ACTION and --devices=ACTION (already implemented in GNU grep)
and use --symlinks=ACTION, where action could be "recurse", "skip", and
something like "recurse-if-listed".  If push comes to shove, the -S option is
still available in this case, but I would prefer not to.


Reply to this item at:


  Message sent via/by Savannah

reply via email to

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