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

Possibility to mark options as required #1

merged 2 commits into from Apr 27, 2011


None yet
2 participants

emilssolmanis commented Apr 23, 2011

Hey, so I added the "required" flag we talked about, changes are minimal and I added a test-case for the required flag in the OptionParser unit test. Anyway, You can see the changes clearly in the changed files section I guess...

pholser added a commit that referenced this pull request Apr 27, 2011

Merged pull request #1 from TC1/master.
Possibility to mark options as required

@pholser pholser merged commit fd978de into jopt-simple:master Apr 27, 2011


This comment has been minimized.


pholser commented Apr 27, 2011


Should options which are marked as required cause the help screen entries for those options to look any different from the others? If so, what would you propose?


This comment has been minimized.

emilssolmanis commented Apr 28, 2011

Well I suppose they should, since the exception is thrown @ parse time. Didn't think of that initially, sorry for that I guess... I think something along the lines of "" before the "default" spec should do just fine.

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