-
Notifications
You must be signed in to change notification settings - Fork 66
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Strange behaviour when search string begins with + character #378
Comments
Ending the options part of the command line arguments with
So |
Yes, |
To be clear, I don’t have anything to do with ack other than as a satisfied user. Just trying to be helpful by pointing out the standard (far beyond just ack) way of getting around the “non-option argument looks like an option” problem. |
which we can all agree upon, but i do not quickly see any
(as suggested) are likely to be brittle / fragile. Worth considering, I may go look at While
(And thank you @blmatthews for being good community member here.) |
hah, @epa Ed already did so. sciurius/perl-Getopt-Long#30 wherein maintainer Johan Vromans replies
which are documented in the POD. So yes, we could force it. (I'm unconvinced the above syntax is quite correct but hint is there.) |
I note an issue with the suggested ENV fix.
So that workaround may not be available. Unclear immediately if bug is in |
I would expect the combination of args below to not read
Either we need an additional flag to not process Edgecases are fun ! 👀 🙄 |
Do you have any tests written that would save me from writing them? |
I haven't written tests , no |
I was asking @epa who sounded like he had been working on code. |
Here's an example test to add to
|
I want to search for the literal string
+1
but the obvious command line does something strange:I can reproduce this also with current dev branch.
I believe it's caused by
Getopt::Long
, which by default accepts the obsolete+
prefix for long options as an alternative to--
. (Some GNU utilities used to accept the+
form but moved to--
in the early 1990s.)It should be possible to say
or alternatively
but because of the way the code calls that module I wasn't successful in creating a patch. Could you have a look please?
The text was updated successfully, but these errors were encountered: