I am using commander package as CLI parser.
commander
.command('command1 <parameter>' )
.description('description 1 goes here')
.command('command2 <parameter>' )
.description('description 2 goes here')
Is there a way to display short descriptions when global help command is called, e.g.
myprogram help
# Commands:
# command1 <parameter> description 1 goes here
# command2 <parameter> description 2 goes here
but also have ability to show expanded help when help for specific command is called:
myprogram help command1
# command1 is used for...
#
# ... detailed description
#
# ...
Figured it out with package's author help.
.description()
can be used to add short inline description shown only on generalhelp
command, while.addHelpText()
can include additional help test shown on command-specific help, e.g.