[Top][All Lists]

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

[bug #59000] regexp sees parse-string "-x" as a parameter!

From: Paul Gover
Subject: [bug #59000] regexp sees parse-string "-x" as a parameter!
Date: Mon, 24 Aug 2020 05:51:51 -0400 (EDT)
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:79.0) Gecko/20100101 Firefox/79.0

Follow-up Comment #1, bug #59000 (project grub):

Actually, doing a test in grub-emu, I get:

grub> foo="-gentoo" ; regexp --set=1:bah '^(.*)$' "$foo" ; echo $bah
error: unknown argument `-g'.

(Of course the regex in this case is trivial for testing.  The real one was
something like '^([^[:digit:]]*)([[:digit:]]*)(.*)$' but that doesn't affect
the command parsing.)

Either regexp should always treat the last two arguments as pattern and
string, and avoid parsing them as parameters, or introduce a couple of long
options, say

regexp ... --pattern="foo" --string="bah"

as an alternative to positional parameters.


Reply to this item at:


  Message sent via Savannah

reply via email to

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