This version is still in development and is not considered stable yet. For the latest stable version, please use Spring Shell 3.3.3!spring-doc.cn

Programmatic

Programmatic way with CommandRegistration is to use withOption to define an option.spring-doc.cn

CommandRegistration registration = CommandRegistration.builder()
	.withOption()
		.longNames("arg1")
		.and()
	.build();

CommandRegistration can be defined as a bean or manually registered with a CommandCatalog.spring-doc.cn

Check below sections for other option types, i.e. short format.