我正在使用指挥官包作为 CLI 解析器。
commander
.command('command1 <parameter>' )
.description('description 1 goes here')
.command('command2 <parameter>' )
.description('description 2 goes here')
有没有办法在调用全局帮助命令时显示简短描述,例如
myprogram help
# Commands:
# command1 <parameter> description 1 goes here
# command2 <parameter> description 2 goes here
但也有能力在调用特定命令的帮助时显示扩展帮助:
myprogram help command1
# command1 is used for...
#
# ... detailed description
#
# ...