jcommander icon indicating copy to clipboard operation
jcommander copied to clipboard

Support for default command

Open mkarg opened this issue 3 years ago • 1 comments

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 avatar Mar 23 '21 14:03 mkarg

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

mkarg avatar Sep 01 '22 12:09 mkarg