-
-
Notifications
You must be signed in to change notification settings - Fork 3.3k
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
Regression: combined shorthand flags (like -so for -s -o) fail as of #8879 #8956
Comments
As noted in #8879 I think we might have to live with this, but we can leave this open for comments. |
A recent change will make the error message for the above command more intelligible:
|
Speaking for myself, I have ten+ years of scripts/projects/Makefiles that invoke Pandoc and use combined short flags and am not looking forward to finding and updating them all :\ |
I'd really like to find a solution, but I don't know what the best solution is.
|
Note: the following boolean flags have short versions:
That's only three. So perhaps there are a few more solutions;
|
Sketch of solution 7: Iterate through the raw list of arguments:
|
I don't have much to contribute on the parsing front, but I could try to collect all the command-line invocations I have for use as parsing tests if needed. When I see major pull requests accepted without any tests whatsoever in a large project, it leaves me concerned. |
Sure, that would be helpful. I'm trying to implement suggestion 7. |
I've included some tests, but if you have cases that seem significantly different, please feel free to suggest them. |
Sorry, can you point me toward the tests? I didn't find them in bec5429.
I did a cursory grep of my scripts, Makefiles, and terminal history and only see a few instances of combined short options. Stuff like |
Sorry, forgot to check in the tests. |
The substantive change here is the `-strue` will now work instead of being interpreted as `-s -true`. This is somewhat ad hoc, but I don't think we'll ever have an output format named `rue`, so it's probably okay.
To reproduce:
Filing a separate bug as requested. See original topic at #8879 (comment).
The text was updated successfully, but these errors were encountered: