标签

Option Label 在 shell 本身中没有其他功能行为,除了 多么默认help命令输出。在命令文档中 一种类型的 an option 被记录下来,但这并不总是非常有用。因此 您可能希望为选项提供更好的描述性词。spring-doc.cadn.net.cn

Label 不支持legacy annotation.
CommandRegistration labelOption() {
	return CommandRegistration.builder()
		.withOption()
			.longNames("arg")
			.label("MYLABEL")
			.and()
		.build();
}

然后,定义标签将显示在help.spring-doc.cadn.net.cn

my-shell:>help labelOption
NAME
       labelOption -

SYNOPSIS
       labelOption --arg MYLABEL

OPTIONS
       --arg MYLABEL
       [Optional]

APP信息