Possibility to mark options as required #1

Merged
merged 2 commits into from Apr 27, 2011

Conversation

Projects
None yet
2 participants

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 pholser added a commit that referenced this pull request Apr 27, 2011

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

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

Collaborator

pholser commented Apr 27, 2011

Merged.

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?

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