For the latest stable version, please use Spring Shell 3.3.3!spring-doc.cn

Label

Option Label has no functional behaviour within a shell itself other than what a default help command outputs. Within a command documentation a type of an option is documented but this is not always super useful. Thus you may want to give better descriptive word for an option.spring-doc.cn

Label is not supported with legacy annotation.
CommandRegistration labelOption() {
	return CommandRegistration.builder()
		.withOption()
			.longNames("arg")
			.label("MYLABEL")
			.and()
		.build();
}
void labelOption(
	@Option(label = "MYLABEL") String arg
) {
}

Defining label is then shown in help.spring-doc.cn

my-shell:>help labelOption
NAME
       labelOption -

SYNOPSIS
       labelOption --arg MYLABEL

OPTIONS
       --arg MYLABEL
       [Optional]