cbeust/jcommander

Support for default command

mkarg opened this issue · 1 comments

mkarg commented

For some applications it might be beneficial to have a default command which will be invoked if no command is explicitly provided. Currently in this situation usage() is executed, but it might be a good thing if instead the default command gets executed if one is declared:

 // don't show usage() but instead invoke this command if none is provided at runtime
jCommander.setDefaultCommand(command);
mkarg commented

@cbeust I would provide a PR if you think this feature is benefical.