-
-
Notifications
You must be signed in to change notification settings - Fork 8
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
Double hyphen not handled correctly in some situations #15
Comments
This is a strange edge case where it's not so clear what the correct behaviour is, IMO, but it does make sense to do the same as |
Thanks for reporting this guys! It took me a while, but I finally had a chance to look into it, and it turns out the issue isn’t just with "--" alone. The root cause is that Bash’s built-in getopts supports adjacent variable-value syntax, like what you often see when compiling C: The good news is the fix is fairly straightforward – #f263a9c – and will be available in getopts_long v1.2.3. 🙂 |
- Reverted adjacent option-value syntax for long options - Test helper improvements: - Added the ability to pre-process test output using multiple sed expressions. - Added the capability to match the context of a single output line against a regex.
Try
and compare with the behavior of
getopts
.getopts
is correctly able to stop parsing when the double-hyphen is grouped with the non-argument-requiring option, whether or not it is space separated, and whether or not '-:' is included in the shortopt spec.The text was updated successfully, but these errors were encountered: