Package: grep;
Message #11 received at 68666 <at> debbugs.gnu.org (full text, mbox):
From: Karl Berry <karl <at> freefriends.org> To: eggert <at> cs.ucla.edu Cc: 68666 <at> debbugs.gnu.org Subject: Re: bug#68666: warning if --exclude-dir arg contains /? Date: 2024年1月23日 15:23:50 -0700
That's not quite true, as it can match command-line arguments.
I see. Perhaps the manual could be a little less terse than expecting
readers to understand the difference between "name suffix" and "base
name". Ok, it's clear in retrospect, but ... maybe something like (not
sure I got it correct):
---
Skip any command-line directory with a name suffix (possibly with
several file name components) that matches the pattern @var{glob}.
When searching recursively, skip any subdirectory whose base name
(the last file name component) matches @var{glob}. Ignore any
redundant trailing slashes in @var{glob}.
In other words if @var{glob} contains a @samp{/} (except for the
ignored trailing slashes), the pattern will never match when searching
recursively, but may match against explicit command line arguments.
---
It should be possible to give useful warnings in some cases, though.
If glob contains a / and there are no command line args,
it seems a warning is warranted?
Probably too late to change the meaning of existing options now,
Agreed. --thanks, karl.
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.