bug-gnulib
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH 2/3] dfa: new option DFA_STRAY_BACKSLASH_WARN


From: Jim Meyering
Subject: Re: [PATCH 2/3] dfa: new option DFA_STRAY_BACKSLASH_WARN
Date: Mon, 6 Jun 2022 12:37:17 -0700

On Sun, Jun 5, 2022 at 10:45 AM Paul Eggert <eggert@cs.ucla.edu> wrote:
> On 6/4/22 18:45, Bruno Haible wrote:
> > And maybe some people find it OK to get the "stray \ before -" warning for
> >    grep -e '\-x' FILE
> > and to inhibit it only when the option -e or the marker '--' is not used?
>
> Yes, thanks, this narrower exception sounds better. Revised grep patch
> attached.

Thanks, Paul and Bruno. That looks fine.
I confirmed that the diagnostic is elicited only when the offending
pattern is specified on the command line and not as an argument to the
-e option. I.e., this still elicits the diagnostic:

$ :|grep -e '\-x'
grep: warning: stray \ before -

Once you push that (and assuming you have nothing else pending), I'll
prepare another pre-release snapshot.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]