-
Notifications
You must be signed in to change notification settings - Fork 1.7k
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
Reordering of args to Command if BoolFlag is after args #103
Comments
stengaard
changed the title
Reordering of args to Command if flag is after args
Reordering of args to Command if BoolFlag is after args
Jul 3, 2014
Closed
jszwedko
added a commit
that referenced
this issue
May 7, 2016
This was introduced by #36, but only worked in the specific case of all arguments being passed before all flags. If the user mixed them, they ended up with odd parsing behavior where the arguments were reordered (causing #103 and #355). Given the tradeoffs I think we should remove support for flag reordering. Fixes #103 Fixes #355
Fixed by #398 (requires use of the |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
if a
Command
is invoked ascli cmd arg1 -f arg2
where-f
is aBoolFlag
the result ofctx.Args()
in the command function will be[arg2 arg1]
.This appears to be related to #36
I have made the test case below (which currrently fails), but I am not really able to find a decent fix.
Fails with
Hope you can come up with something good.
The text was updated successfully, but these errors were encountered: