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:

  <http://savannah.gnu.org/patch/?func=detailitem&item_id=4354>

_______________________________________________
  Message sent via/by Savannah
  http://savannah.gnu.org/



Reply via email to