jcommander
jcommander copied to clipboard
Support for default command
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);
@cbeust I would provide a PR if you think this feature is benefical.