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 for requiredIfNot #31

Closed
ohr opened this Issue Sep 3, 2013 · 3 comments

Comments

Projects
None yet
2 participants
@ohr

ohr commented Sep 3, 2013

Hi,

how about a variant of #12 : make a option required if another one is not present. This would be handy for a couple of use cases, e.g.:
I'm offering an option to load a properties file containing default option values, but if this option is not present, I want to enforce a few other options on the command line to be required.

Really nice API btw.!

Christian

@pholser

This comment has been minimized.

Show comment
Hide comment
@pholser

pholser Sep 3, 2013

Collaborator

Sounds reasonable. How about calling it requiredUnless()?

Collaborator

pholser commented Sep 3, 2013

Sounds reasonable. How about calling it requiredUnless()?

@ohr

This comment has been minimized.

Show comment
Hide comment
@ohr

ohr Sep 3, 2013

even better.

ohr commented Sep 3, 2013

even better.

@pholser

This comment has been minimized.

Show comment
Hide comment
@pholser

pholser Sep 3, 2013

Collaborator

@ohr Great! Would you like to take a crack at a pull request?

Collaborator

pholser commented Sep 3, 2013

@ohr Great! Would you like to take a crack at a pull request?

ohr added a commit to ohr/jopt-simple that referenced this issue Sep 4, 2013

ohr added a commit to ohr/jopt-simple that referenced this issue Sep 4, 2013

@ohr ohr referenced this issue Sep 4, 2013

Merged

Added requiredUnless #32

@pholser pholser closed this Sep 9, 2013

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment