【发布时间】:2020-11-28 21:21:08
【问题描述】:
当用户没有提供子命令时,有没有办法打印帮助信息?
以下不起作用,因为它运行没有实现的可调用对象。
@Command(
name = "tool",
mixinStandardHelpOptions = true,
subcommands = [ListPlugins::class, RunJob::class, CommandLine.HelpCommand::class])
class Main : Callable<Int> {
override fun call(): Int {
// CommandLine.HelpCommand().run()
return 0
}
}
【问题讨论】: