For every command I have a concrete class which implement certain interface. For example:
public class FooCommand implements Command{
@Parameter(names = {"-?","--help"}, description = "display this help",help = true)
private boolean helpRequested = false;
...
}
And this is the usage message I get:
Usage: foo-command [options]
Options:
-?, --help
display this help
How can I add description to command (but not to option). For example I want to get such usage message:
Usage: foo-command [options] - This command is used as base foo
Options:
-?, --help
display this help
EDIT I have foo-command, boo-command, lala-command. However, all these commands are separate and are not within one main command (by other words this is not like git clone ...). This is the way I get usage
JCommander jCommander=new JCommander(command, args);
jCommander.setProgramName(commandName);//for example foo-command
StringBuilder builder=new StringBuilder();
jCommander.usage(builder);