From unknown Mon Aug 18 11:15:27 2025 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-Mailer: MIME-tools 5.509 (Entity 5.509) Content-Type: text/plain; charset=utf-8 From: bug#63030 <63030@debbugs.gnu.org> To: bug#63030 <63030@debbugs.gnu.org> Subject: Status: Minor innacuracy on --exclude documentation? Reply-To: bug#63030 <63030@debbugs.gnu.org> Date: Mon, 18 Aug 2025 18:15:27 +0000 retitle 63030 Minor innacuracy on --exclude documentation? reassign 63030 grep submitter 63030 Sebastian Carlos severity 63030 normal thanks From debbugs-submit-bounces@debbugs.gnu.org Sun Apr 23 07:06:35 2023 Received: (at submit) by debbugs.gnu.org; 23 Apr 2023 11:06:35 +0000 Received: from localhost ([127.0.0.1]:44675 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pqXYA-0001Yf-PI for submit@debbugs.gnu.org; Sun, 23 Apr 2023 07:06:35 -0400 Received: from lists.gnu.org ([209.51.188.17]:51824) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pqXY8-0001YX-37 for submit@debbugs.gnu.org; Sun, 23 Apr 2023 07:06:32 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pqXY6-0002Lk-Ov for bug-grep@gnu.org; Sun, 23 Apr 2023 07:06:31 -0400 Received: from mail-lj1-x243.google.com ([2a00:1450:4864:20::243]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pqXXx-0005HZ-Ix for bug-grep@gnu.org; Sun, 23 Apr 2023 07:06:29 -0400 Received: by mail-lj1-x243.google.com with SMTP id 38308e7fff4ca-2a8dc09e884so6129701fa.1 for ; Sun, 23 Apr 2023 04:06:19 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1682247977; x=1684839977; h=to:subject:message-id:date:from:mime-version:from:to:cc:subject :date:message-id:reply-to; bh=CXBXjMdAeIw5mP0SVhsjy/zddw00Dmpi84HO3nJ24Tc=; b=l6T1u+bWL3aFWTZYPoz2xmhMqF3D+6mVe6dsufDgcTA4OuLcg8eeLmpEUzgBd9c9Pq /IvjEgTCnzkG8XuIQETt0T56kZIiI0n4pS4zLENzbEojmzg3Wz20Nm8Vi+7NKAmCX/YV j/5njfvEx6JshsAvwYmTyMj4wGjwtSOxntBZ/oZLYUN1AENmtW8fVEl4sFnLPWEMn6BM h4uNHSzrkSntYwPwGZeMZe4frZdiUgFetYjKNIMtHKukQFBDUzB7Z5YqXIEBjkAFSvYg VAT3xBQr+9MRhL0cQ6sZ+SpvdHRq1/7q7JGGeH00qKxxUe6SdLOLcNAvAT6aPJzm83Bw 7Ceg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1682247977; x=1684839977; h=to:subject:message-id:date:from:mime-version:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=CXBXjMdAeIw5mP0SVhsjy/zddw00Dmpi84HO3nJ24Tc=; b=ETlU5MnzEzEgauMVG1tQFfexZmWjDREsGnF0bNk1tCIlUQKKi7x4UGZ9wV/i2qbsiL 7tLgyEltYHL1GVnEBXbNdxM7BJHSBDr83NcXRazXQE/JVR5Tno/i5RC4zuRycS1cjyRP kk8off0dCI5TIDC96mXiIXMpGspqlHHc1qFR/mP+rgg93ngLmvTgz+2fnelbQ0vCrt07 S4NFSsscrx/gF9wN6/9BVppQ23Et3kHPKhJylS/GAFiLR2Vm2IG9W8iwCbwoeySwvI8f WnIJxgvbOnLIPkGtnLrNTOv2M8fTU7DWIg4wW7qHBXGaQmcXkzCo8mJko6MyJvLo8gp4 br0Q== X-Gm-Message-State: AAQBX9fxKqCQHQpRDFbe6NyYKccoVXFkLXnNWHCHTVBTnRk+q3e7JDhS +c5rjALZB7hSouA/Q+RLOOrOPSdsSv6Jb3l7EF4F/mk4clUBXQ== X-Google-Smtp-Source: AKy350Yx7XQCLQfJHnDQqNoAvPs+kAtrTY7bSw0kEts7unpcrQ7mayrJmdlF4XrjC7P9GQOJn7uoZDnsPP3J6rfu3PE= X-Received: by 2002:a19:ac46:0:b0:4ef:ed0f:c604 with SMTP id r6-20020a19ac46000000b004efed0fc604mr517512lfc.2.1682247977314; Sun, 23 Apr 2023 04:06:17 -0700 (PDT) MIME-Version: 1.0 From: Sebastian Carlos Date: Sun, 23 Apr 2023 13:06:05 +0200 Message-ID: Subject: Minor innacuracy on --exclude documentation? To: bug-grep@gnu.org Content-Type: multipart/alternative; boundary="0000000000001caf4505f9fee19f" Received-SPF: pass client-ip=2a00:1450:4864:20::243; envelope-from=sebaaa1754@gmail.com; helo=mail-lj1-x243.google.com X-Spam_score_int: -18 X-Spam_score: -1.9 X-Spam_bar: - X-Spam_report: (-1.9 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_ENVFROM_END_DIGIT=0.25, FREEMAIL_FROM=0.001, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-Spam-Score: -1.1 (-) X-Debbugs-Envelope-To: submit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -2.1 (--) --0000000000001caf4505f9fee19f Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Hello, The current version of the --exclude documentation says the following: ``` =E2=80=98--exclude=3DGLOB=E2=80=99 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 (=E2=80=98/=E2=80=99) 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 =E2=80=98*=E2=80=99, =E2=80=98?=E2=80=99, and =E2=80=98[=E2=80= =99...=E2=80=98]=E2=80=99 as wildcards, and =E2=80=98\=E2=80=99 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": ``` =E2=80=98-D ACTION=E2=80=99 =E2=80=98--devices=3DACTION=E2=80=99 If an input file is a device, FIFO, or socket, use ACTION to process it. If ACTION is =E2=80=98read=E2=80=99, all devices are read= just as if they were ordinary files. If ACTION is =E2=80=98skip=E2=80=99, device= s, FIFOs, and sockets are silently skipped. By default, devices are read if they are on the command line or if the =E2=80=98-R=E2=80=99 (=E2=80=98--der= eference-recursive=E2=80=99) option is used, and are skipped if they are encountered recursively and the =E2=80=98-r=E2=80=99 (=E2=80=98--recursive=E2=80=99) 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": ``` =E2=80=98--include=3DGLOB=E2=80=99 Search only files whose name matches GLOB, using wildcard matching as described under =E2=80=98--exclude=E2=80=99. If contradictory =E2= =80=98--include=E2=80=99 and =E2=80=98--exclude=E2=80=99 options are given, the last matching one w= ins. If no =E2=80=98--include=E2=80=99 or =E2=80=98--exclude=E2=80=99 options mat= ch, a file is included unless the first such option is =E2=80=98--include=E2=80=99. ``` --0000000000001caf4505f9fee19f Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Hello,

The current version of the --exc= lude documentation says the following:

```
=E2=80=98--exclude=3DG= LOB=E2=80=99
=C2=A0 =C2=A0 =C2=A0Skip any command-line file with a name = suffix that matches the
=C2=A0 =C2=A0 =C2=A0pattern GLOB, using wildcard= matching; a name suffix is either the
=C2=A0 =C2=A0 =C2=A0whole name, o= r a trailing part that starts with a non-slash
=C2=A0 =C2=A0 =C2=A0chara= cter immediately after a slash (=E2=80=98/=E2=80=99) in the name.=C2=A0 Whe= n
=C2=A0 =C2=A0 =C2=A0searching recursively, skip any subfile whose base= name matches
=C2=A0 =C2=A0 =C2=A0GLOB; the base name is the part after = the last slash.=C2=A0 A pattern
=C2=A0 =C2=A0 =C2=A0can use =E2=80=98*= =E2=80=99, =E2=80=98?=E2=80=99, and =E2=80=98[=E2=80=99...=E2=80=98]=E2=80= =99 =C2=A0as wildcards, and =E2=80=98\=E2=80=99 to quote a
=C2=A0 =C2=A0= =C2=A0wildcard or backslash character literally.
```

I think tha= t "Skip any command-line file" should be replaced with "Skip= any
file", because --exclude does work even if files are not provi= ded 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 argum= ents" is consistent
with the documentation for --devices, which mak= es an explicit distinction
between "command-line devices" and = "devices that are encountered=C2=A0
recursively":
```
=E2=80=98-D ACTION=E2=80=99
=E2=80=98--devices=3DACTION=E2=80= =99
=C2=A0 =C2=A0 =C2=A0If an input file is a device, FIFO, or socket, u= se ACTION to
=C2=A0 =C2=A0 =C2=A0process it.=C2=A0 If ACTION is =E2=80= =98read=E2=80=99, all devices are read just as if
=C2=A0 =C2=A0 =C2=A0th= ey were ordinary files.=C2=A0 If ACTION is =E2=80=98skip=E2=80=99, devices,= FIFOs, and
=C2=A0 =C2=A0 =C2=A0sockets are silently skipped.=C2=A0 By d= efault, devices are read if they
=C2=A0 =C2=A0 =C2=A0are on the command = line or if the =E2=80=98-R=E2=80=99 (=E2=80=98--dereference-recursive=E2=80= =99)
=C2=A0 =C2=A0 =C2=A0option is used, and are skipped if they are enc= ountered recursively
=C2=A0 =C2=A0 =C2=A0and the =E2=80=98-r=E2=80=99 (= =E2=80=98--recursive=E2=80=99) option is used.=C2=A0 This option has no
= =C2=A0 =C2=A0 =C2=A0effect on a file that is read via standard input.
``= `

Another significant argument in favor of the proposed change is th= at the
similar --include option doesn't mention "command-line f= iles":

```
=E2=80=98--include=3DGLOB=E2=80=99
=C2=A0 =C2= =A0 =C2=A0Search only files whose name matches GLOB, using wildcard matchin= g
=C2=A0 =C2=A0 =C2=A0as described under =E2=80=98--exclude=E2=80=99.=C2= =A0 If contradictory =E2=80=98--include=E2=80=99 and
=C2=A0 =C2=A0 =C2= =A0=E2=80=98--exclude=E2=80=99 options are given, the last matching one win= s.=C2=A0 If no
=C2=A0 =C2=A0 =C2=A0=E2=80=98--include=E2=80=99 or =E2=80= =98--exclude=E2=80=99 options match, a file is included unless
=C2=A0 = =C2=A0 =C2=A0the first such option is =E2=80=98--include=E2=80=99.
```
--0000000000001caf4505f9fee19f-- From debbugs-submit-bounces@debbugs.gnu.org Sun Apr 23 08:04:49 2023 Received: (at 63030) by debbugs.gnu.org; 23 Apr 2023 12:04:49 +0000 Received: from localhost ([127.0.0.1]:44710 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pqYSW-0005kY-Qk for submit@debbugs.gnu.org; Sun, 23 Apr 2023 08:04:48 -0400 Received: from mail-lf1-f65.google.com ([209.85.167.65]:38147) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pqYSV-0005kL-HS for 63030@debbugs.gnu.org; Sun, 23 Apr 2023 08:04:47 -0400 Received: by mail-lf1-f65.google.com with SMTP id 2adb3069b0e04-4edc51644b6so775108e87.1 for <63030@debbugs.gnu.org>; Sun, 23 Apr 2023 05:04:47 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1682251481; x=1684843481; h=to:subject:message-id:date:from:mime-version:from:to:cc:subject :date:message-id:reply-to; bh=RHkP81a5vo0NeM+Ras9EnzLOM23ai41OlqjNf/YD+mo=; b=aKMryhaR2pv/cipxlRVDyhHQSqnviLYRj2DgnnEj51DVZjzMucX4WJyQaSg8WUj/Lw yHYqLU/B5mquyrW8m0L1VcUvO5+inkkDwD7hO+tKFh1YfqiEoxGPtnHeO0dCgqwvA+Ao 6CiE5wL/89iZ2TIOkSGZSva0XoEu2rh79KrTNVh1lMyI+myLN/hr7wKNxrq+4ZpYx4bK 1pBRQu1k+k7WZ1d4we2xV12iZfGvXWhtUFzGCyDjcmIqph4fsOslLF3p3g321P4EUOq3 +ZCa0l2i+jYdltHpefzwHEta3VAjsVMYBubjcGZtG4EliGFwzmy50PRRts/0HBLcvOml O2Mg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1682251481; x=1684843481; h=to:subject:message-id:date:from:mime-version:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=RHkP81a5vo0NeM+Ras9EnzLOM23ai41OlqjNf/YD+mo=; b=Tnv0d5boWKMSC97OU96kbrDKyxiWPBtO5dHp2GJN5UUj/PF7jAW84Uor9rRDnzXkQD Gyhp/8IxZjpQBrPRRvOr+5irYviUSVcMgfJBcXgTkZHgWIOIlMJ5VFmXuaPsILk61VQu TultGgnf8950BMeiKbwkf0/8wHyxgHE+deUPyFrPhiZAYa6/tWaYdqGpb84GPwZNS+pC NwdHaSSP93v98/mZq3r7nDq6Q8E5UKS8qjchKclnJSJ1aRv8BQaf67Evdaxh0eyWxbsD hqG59XrjOsashO7n9JyDRE56UyKk6iaVqCnhNo5AXFuCLB/Hh3D8tecEXXWtNRBJ0wLW UYUg== X-Gm-Message-State: AAQBX9fm+KU9IjKsd8CgA5eAMQhopI5b+4tNpOkJaif8LaENee++58dI bBGEsfR94GTnZO/BQBWgTaJYkGBl1/ob1l11Ah+EnCSUXr1KXQ== X-Google-Smtp-Source: AKy350ZgJY+2FuD5dZIJwUgLWmdQIF6afZgQGI4lWZ0hkemyeHyb8NnEu0V8z4sYUVTsDpeY28gFFsZRzGbCIGLMEM4= X-Received: by 2002:a2e:1f02:0:b0:2a7:653d:1678 with SMTP id f2-20020a2e1f02000000b002a7653d1678mr2396689ljf.1.1682251481062; Sun, 23 Apr 2023 05:04:41 -0700 (PDT) MIME-Version: 1.0 From: Sebastian Carlos Date: Sun, 23 Apr 2023 14:04:29 +0200 Message-ID: Subject: correction To: 63030@debbugs.gnu.org Content-Type: multipart/alternative; boundary="000000000000f3a1e705f9ffb166" X-Spam-Score: 0.3 (/) X-Debbugs-Envelope-To: 63030 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.7 (/) --000000000000f3a1e705f9ffb166 Content-Type: text/plain; charset="UTF-8" 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. --000000000000f3a1e705f9ffb166 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
On second thought, I think the documentation is fine. I ju= st misread it. It has two sentences: "Skip any COMMAND-LINE file with.= .." and "When searching recursively, skip any SUBFILE whose...&qu= ot;. So both cases are considered and it doesn't imply that --exclude a= cts on command line files only.
--000000000000f3a1e705f9ffb166-- From debbugs-submit-bounces@debbugs.gnu.org Mon Apr 24 16:06:00 2023 Received: (at 63030-done) by debbugs.gnu.org; 24 Apr 2023 20:06:00 +0000 Received: from localhost ([127.0.0.1]:50392 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pr2Rk-00083U-Bw for submit@debbugs.gnu.org; Mon, 24 Apr 2023 16:06:00 -0400 Received: from mail-lj1-f175.google.com ([209.85.208.175]:57442) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pr2Ri-00083H-My for 63030-done@debbugs.gnu.org; Mon, 24 Apr 2023 16:05:59 -0400 Received: by mail-lj1-f175.google.com with SMTP id 38308e7fff4ca-2a8a600bd05so46175511fa.2 for <63030-done@debbugs.gnu.org>; Mon, 24 Apr 2023 13:05:58 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1682366753; x=1684958753; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=EHraKEq3I739gSmtuw/wrxHufmujAEhBymjMj1BBKC0=; b=CoNlKg1X+3gdqQp/3OV2Vp1XvGyyc5uhQgdbtjuG0sVE4OLL6O0PsRiV40QjD0I6SX y2iOe8ar6L4OxHmDLJEllds1vGtVfqVnGntHg27pT68sps6oEhubp97ue4WcbSulZl3h 4um6Mw6dmqMniFQHQV3mbwkJ3w5EKLbyNEPhYvHcyFzNL5u+e9gi4iU1//ZrU99TfWRK U7w7OzFxlEy35VLJV95F6DF4pSFvpt2iSDN+JFyo1T5/o1w1xH95Awkex6mDT7KXOYyN vohHBy3DM5Z1cSrIkEp6Db9Z6CDQunrb+cDbMoC6Uy2UAOdzCi6knMf3VGVwd1VVvtv1 ptvQ== X-Gm-Message-State: AAQBX9dq0f9cpu2ECPHbf8xlovgys22R4IRZZeLtCLE060/6mvHsS7cC JcuvkileioYU/tbcSh3i0A/xAKOkjN5UMKSMW94= X-Google-Smtp-Source: AKy350bceCzqHSl1WOiWDfec0OX65WYg3wugppoTtS0TsC9f5Fjh1VbKY1hx6LoG8JZbcKUdvcQP0Ne6thAjgCgvPxI= X-Received: by 2002:a2e:b2d1:0:b0:2a8:e6f8:301e with SMTP id 17-20020a2eb2d1000000b002a8e6f8301emr2783653ljz.28.1682366752498; Mon, 24 Apr 2023 13:05:52 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: From: Jim Meyering Date: Mon, 24 Apr 2023 13:05:31 -0700 Message-ID: Subject: Re: bug#63030: correction To: Sebastian Carlos Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Spam-Score: 0.2 (/) X-Debbugs-Envelope-To: 63030-done Cc: 63030-done@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -0.8 (/) tags 63030 notabug done On Sun, Apr 23, 2023 at 5:05=E2=80=AFAM Sebastian Carlos 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 searchi= ng > 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. From unknown Mon Aug 18 11:15:27 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Tue, 23 May 2023 11:24:05 +0000 User-Agent: Fakemail v42.6.9 # This is a fake control message. # # The action: # bug archived. thanks # This fakemail brought to you by your local debbugs # administrator