Skip to content

Allow for flags being passed in after arguments - #36

Merged
codegangsta merged 1 commit into
urfave:masterfrom
dam5s:master
Sep 19, 2013
Merged

codegangsta merged 1 commit into
urfave:masterfrom
dam5s:master

Conversation

@dam5s

@dam5s dam5s commented Sep 18, 2013

Copy link
Copy Markdown

For the Cloud Foundry CLI we need the ability to have flags being passed after other arguments, for example:

cf push app --option some-value

This commit should allow for both ways to work, but not the mix of the two: flags before and after other arguments won't work.

@codegangsta

Copy link
Copy Markdown
Contributor

Thanks, I will take a look at this soon

@codegangsta

Copy link
Copy Markdown
Contributor

This looks great. Thanks for writing a test as well

codegangsta added a commit that referenced this pull request Sep 19, 2013
Allow for flags being passed in after arguments
@codegangsta
codegangsta merged commit e8d8047 into urfave:master Sep 19, 2013
jszwedko added a commit that referenced this pull request 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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants