Follow-up Comment #4, patch #4354 (project grep): Hi, many thanks for your comments.
No, I don't think grep needs to implement all of find's expressiveness. But it would be good at least to have a way to recurse without following symlinks, as this is the basic functionality that you get with -R in other GNU programs such as ls or chmod, so I'm a little surprised it isn't already the default for grep. I think the --symlinks=ACTION idea is a good one, but I feel that the actions should be "follow", "skip" and something like "follow-if-listed". The reason for "follow" rather than "recurse" is that some links may be to regular files etc. If we go this route, then for consistency this option should also apply in the absence of recursion, even if it is rarely useful to specify it in that case. I am going to be unable to check this page for at least the next few days, but I'll have a go at producing an updated patch I guess some time later next week, unless anyone else feels like doing it in the meantime. Many thanks for the suggestion regarding code cleanup. I suspect that the specific lines may change a bit anyway in the updated patch, but I will try to apply the same principles. (Somehow I'd got the impression that GNU style was to use braces even for single-statement if/while/for, perl-style, but obviously this is wrong.) _______________________________________________________ Reply to this item at: <http://savannah.gnu.org/patch/?func=detailitem&item_id=4354> _______________________________________________ Message sent via/by Savannah http://savannah.gnu.org/