From: "Mattias Engdegård" <mattiase@acm.org>
To: Eli Zaretskii <eliz@gnu.org>
Cc: 49978@debbugs.gnu.org
Subject: bug#49978: 28.0.50; grep-highlight-matches auto-detection broken on macOS [PATCH]
Date: Tue, 10 Aug 2021 15:39:04 +0200 [thread overview]
Message-ID: <3E02EB6C-A3F9-482B-AEF3-50D68DAFAA0A@acm.org> (raw)
In-Reply-To: <83tujxfn7q.fsf@gnu.org>
10 aug. 2021 kl. 15.23 skrev Eli Zaretskii <eliz@gnu.org>:
> Although perhaps we should strengthen the
> search string to be sure we don't hit some false positive: "--color"
> sounds a bit too general, no? Or do you think it's good enough even
> if "--help" causes a non-zero exit code?
I honestly don't know. The patch works here (obviously) but strengthening it using a regexp to avoid matching "--colorise", say, probably won't hurt. Not that it's very likely that this would ever make a difference, but if you think that it's better safe then sorry then I'll do that.
For the record, on this Mac I get:
$ grep --help
usage: grep [-abcDEFGHhIiJLlmnOoqRSsUVvwxZ] [-A num] [-B num] [-C[num]]
[-e pattern] [-f file] [--binary-files=value] [--color=when]
[--context[=num]] [--directories=action] [--label] [--line-buffered]
[--null] [pattern] [file ...]
$ grep --version
grep (BSD grep) 2.5.1-FreeBSD
The exit status is probably a red herring; we do not seem to gain any useful information from it.
next prev parent reply other threads:[~2021-08-10 13:39 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-08-10 12:54 bug#49978: 28.0.50; grep-highlight-matches auto-detection broken on macOS [PATCH] Mattias Engdegård
2021-08-10 13:23 ` Eli Zaretskii
2021-08-10 13:39 ` Mattias Engdegård [this message]
2021-08-10 13:57 ` Eli Zaretskii
2021-08-10 14:03 ` Lars Ingebrigtsen
2021-08-10 15:11 ` Mattias Engdegård
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=3E02EB6C-A3F9-482B-AEF3-50D68DAFAA0A@acm.org \
--to=mattiase@acm.org \
--cc=49978@debbugs.gnu.org \
--cc=eliz@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).