GNU bug report logs - #39678
'grep --ignore-case --color' does not always color the matches

Previous Next

Package: grep;

Reported by: Benno Schulenberg <bensberg <at> telfort.nl>

Date: Wed, 19 Feb 2020 15:28:01 UTC

Severity: normal

Merged with 51255, 51256, 51257

Full log


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

From: Paul Eggert <eggert <at> cs.ucla.edu>
To: bug-grep <at> gnu.org
Subject: Re: bug#39678: warn about stray backslashes
Date: Tue, 24 May 2022 17:52:48 -0700
[Message part 1 (text/plain, inline)]
On 5/23/22 13:03, Paul Eggert wrote:
> it makes sense to warn about EREs like '(*)', '(*a)', '(+)', '(+a)', 
> '({1})', '({1}a)' as POSIX does not specify their behavior, their 
> semantics are unpredictable with GNU grep, and it's plausible that 
> people are making mistakes in this area.

I installed the attached to do that. As before, most of the changes were 
in Gnulib's dfa module.

With all these changes, we now see behavior like this:

$ echo a | src/grep -oi '\a'
src/grep: warning: stray \ before a

which is not ideal (so I'll leave the bug report open), but at least 
this gives the user a warning that the pattern is not on the up-and-up.
[0001-build-update-gnulib-submodule-to-latest.patch (text/x-patch, attachment)]
[0002-grep-warn-about-x-etc.patch (text/x-patch, attachment)]

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

Previous Next


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