cbeust / jcommander

Command line parsing framework for Java

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Support for default command

mkarg opened this issue · 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);

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