GNU bug report logs -
#63030
Minor innacuracy on --exclude documentation?
Previous Next
To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 63030 in the body.
You can then email your comments to 63030 AT debbugs.gnu.org in the normal way.
Toggle the display of automated, internal messages from the tracker.
Report forwarded
to
bug-grep <at> gnu.org
:
bug#63030
; Package
grep
.
(Sun, 23 Apr 2023 11:07:01 GMT)
Full text and
rfc822 format available.
Acknowledgement sent
to
Sebastian Carlos <sebaaa1754 <at> gmail.com>
:
New bug report received and forwarded. Copy sent to
bug-grep <at> gnu.org
.
(Sun, 23 Apr 2023 11:07:01 GMT)
Full text and
rfc822 format available.
Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):
[Message part 1 (text/plain, inline)]
Hello,
The current version of the --exclude documentation says the following:
```
‘--exclude=GLOB’
Skip any command-line file with a name suffix that matches the
pattern GLOB, using wildcard matching; a name suffix is either the
whole name, or a trailing part that starts with a non-slash
character immediately after a slash (‘/’) in the name. When
searching recursively, skip any subfile whose base name matches
GLOB; the base name is the part after the last slash. A pattern
can use ‘*’, ‘?’, and ‘[’...‘]’ as wildcards, and ‘\’ to quote a
wildcard or backslash character literally.
```
I think that "Skip any command-line file" should be replaced with "Skip any
file", because --exclude does work even if files are not provided as
explicit
command-line arguments (for example, when using -r).
While it could be ambiguous, this interpretation of "command-line file"
meaning "files explicitly provided as command-line arguments" is consistent
with the documentation for --devices, which makes an explicit distinction
between "command-line devices" and "devices that are encountered
recursively":
```
‘-D ACTION’
‘--devices=ACTION’
If an input file is a device, FIFO, or socket, use ACTION to
process it. If ACTION is ‘read’, all devices are read just as if
they were ordinary files. If ACTION is ‘skip’, devices, FIFOs, and
sockets are silently skipped. By default, devices are read if they
are on the command line or if the ‘-R’ (‘--dereference-recursive’)
option is used, and are skipped if they are encountered recursively
and the ‘-r’ (‘--recursive’) option is used. This option has no
effect on a file that is read via standard input.
```
Another significant argument in favor of the proposed change is that the
similar --include option doesn't mention "command-line files":
```
‘--include=GLOB’
Search only files whose name matches GLOB, using wildcard matching
as described under ‘--exclude’. If contradictory ‘--include’ and
‘--exclude’ options are given, the last matching one wins. If no
‘--include’ or ‘--exclude’ options match, a file is included unless
the first such option is ‘--include’.
```
[Message part 2 (text/html, inline)]
Information forwarded
to
bug-grep <at> gnu.org
:
bug#63030
; Package
grep
.
(Sun, 23 Apr 2023 12:05:01 GMT)
Full text and
rfc822 format available.
Message #8 received at 63030 <at> debbugs.gnu.org (full text, mbox):
[Message part 1 (text/plain, inline)]
On second thought, I think the documentation is fine. I just misread it. It
has two sentences: "Skip any COMMAND-LINE file with..." and "When searching
recursively, skip any SUBFILE whose...". So both cases are considered and
it doesn't imply that --exclude acts on command line files only.
[Message part 2 (text/html, inline)]
Reply sent
to
Jim Meyering <jim <at> meyering.net>
:
You have taken responsibility.
(Mon, 24 Apr 2023 20:06:02 GMT)
Full text and
rfc822 format available.
Notification sent
to
Sebastian Carlos <sebaaa1754 <at> gmail.com>
:
bug acknowledged by developer.
(Mon, 24 Apr 2023 20:06:02 GMT)
Full text and
rfc822 format available.
Message #13 received at 63030-done <at> debbugs.gnu.org (full text, mbox):
tags 63030 notabug
done
On Sun, Apr 23, 2023 at 5:05 AM Sebastian Carlos <sebaaa1754 <at> gmail.com> wrote:
> On second thought, I think the documentation is fine. I just misread it. It
> has two sentences: "Skip any COMMAND-LINE file with..." and "When searching
> recursively, skip any SUBFILE whose...". So both cases are considered and
> it doesn't imply that --exclude acts on command line files only.
Thanks for the follow-up.
This email closes the issue in our tracker.
bug archived.
Request was from
Debbugs Internal Request <help-debbugs <at> gnu.org>
to
internal_control <at> debbugs.gnu.org
.
(Tue, 23 May 2023 11:24:05 GMT)
Full text and
rfc822 format available.
This bug report was last modified 2 years and 86 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.