Subject: bug#37212: closed (Re: bug#37212: Incorrect --exclude description with 'grep --help')

From: [email-masked] (GNU bug Tracking System)
Date: Thu, 02 Jan 2020 09:58:01 +0000

Your bug report

#37212: Incorrect --exclude description with 'grep --help'

which was filed against the grep package, has been closed.

The explanation is attached below, along with your original report.
If you require more details, please reply to [email-masked].

-- 
37212: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=37212
GNU Bug Tracking System
Contact [email-masked] with problems

Subject: Re: bug#37212: Incorrect --exclude description with 'grep --help'
From: Paul Eggert <[email-masked]>
To: Duncan Moore <[email-masked]>
Cc: [email-masked]
Date: Thu, 2 Jan 2020 01:57:15 -0800
List-Id: <debbugs-submit.debbugs.gnu.org>

Thanks for the bug report. I installed the attached (slightly different) patch
to fix the bug and inconsistency.
>From 61bbb574dcf350830b526bea61250e30d95057d0 Mon Sep 17 00:00:00 2001
From: Paul Eggert <[email-masked]>
Date: Thu, 2 Jan 2020 01:54:47 -0800
Subject: [PATCH] doc: fix --exclude description in man page
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

Problem reported by Duncan Moore (Bug#37212).
* src/grep.c (usage): Fix incorrect statement about --exclude
and directories.  Standardize on “that match GLOB” instead
of “matching GLOB”.
---
 src/grep.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/grep.c b/src/grep.c
index 35d563d..7ba602d 100644
--- a/src/grep.c
+++ b/src/grep.c
@@ -1970,8 +1970,8 @@ Output control:\n\
       printf (_("\
       --include=GLOB        search only files that match GLOB (a file pattern)"
                 "\n\
-      --exclude=GLOB        skip files and directories matching GLOB\n\
-      --exclude-from=FILE   skip files matching any file pattern from FILE\n\
+      --exclude=GLOB        skip files that match GLOB\n\
+      --exclude-from=FILE   skip files that match any file pattern from FILE\n\
       --exclude-dir=GLOB    skip directories that match GLOB\n\
 "));
       printf (_("\
-- 
2.17.1

Subject: Incorrect --exclude description with 'grep --help'
From: Duncan Moore <[email-masked]>
To: [email-masked]
Date: Wed, 28 Aug 2019 17:25:54 +0100
List-Id: <debbugs-submit.debbugs.gnu.org>

'grep --help' incorrectly states that the --exclude option operates on
directories. Here's the suggested change to the help text:

-      --exclude=GLOB        skip files and directories matching GLOB
+      --exclude=GLOB        skip files matching GLOB

It might also be worthwhile changing 'that match' to 'matching' in these
2 options to give consistent phrasing across the 4 include/exclude
options, to make it a bit easier for the user to compare them:

-      --include=GLOB        search only files that match GLOB (a file
pattern)
+      --include=GLOB        search only files matching GLOB (a file
pattern)

-      --exclude-dir=GLOB    skip directories that match GLOB
+      --exclude-dir=GLOB    skip directories matching GLOB