GNU bug report logs - #49978
28.0.50; grep-highlight-matches auto-detection broken on macOS [PATCH]

Previous Next

Package: emacs;

Reported by: Mattias Engdegård <mattiase <at> acm.org>

Date: Tue, 10 Aug 2021 12:56:01 UTC

Severity: normal

Tags: patch

Found in version 28.0.50

Done: Mattias Engdegård <mattiase <at> acm.org>

Bug is archived. No further changes may be made.

Full log


Message #11 received at 49978 <at> debbugs.gnu.org (full text, mbox):

From: Mattias Engdegård <mattiase <at> acm.org>
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: 49978 <at> debbugs.gnu.org
Subject: Re: bug#49978: 28.0.50; grep-highlight-matches auto-detection broken
 on macOS [PATCH]
Date: Tue, 10 Aug 2021 15:39:04 +0200
10 aug. 2021 kl. 15.23 skrev Eli Zaretskii <eliz <at> 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.





This bug report was last modified 3 years and 347 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.