On Sun, Jun 5, 2022 at 10:45 AM Paul Eggert <[email protected]> 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.
