Skip to content
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

Support overriding arguments #58

Closed
richard-viney opened this issue Nov 28, 2017 · 4 comments
Closed

Support overriding arguments #58

richard-viney opened this issue Nov 28, 2017 · 4 comments

Comments

@richard-viney
Copy link

Hi, thanks for the great library!

Is it possible to specify arguments multiple times and have the last one take precedence?

E.g. my-app --name foo --name bar would be identical to my-app --name bar.

I know there is good support for array arguments, but using them to get the above functionality doesn't seem ideal.

Thoughts?

@henryiii
Copy link
Collaborator

henryiii commented Nov 28, 2017

It's coming out in 1.3. See #39 and #38. Also #48. Seems like that was a really good suggestion, @lambdafu ! It's called take_lastand can even be set on the default argument for your app.

@richard-viney
Copy link
Author

Sounds great, looking forward to the release :-)

@henryiii
Copy link
Collaborator

I might change the default to take_last(true) before the release, since it seems that other common programs like git use it.

@henryiii henryiii mentioned this issue Nov 28, 2017
@henryiii
Copy link
Collaborator

henryiii commented Dec 1, 2017

1.3 is released, and this is now possible.

@henryiii henryiii closed this as completed Dec 1, 2017
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

No branches or pull requests

2 participants