spring-projects / spring-shell

Spring based shell
http://projects.spring.io/spring-shell/
Apache License 2.0
734 stars 396 forks source link

Unable to add alternative command #941

Closed C-Otto closed 11 months ago

C-Otto commented 11 months ago

When I provide two command settings, I expect both to work. However, with the code shown below the second command cannot be used. Using first and pressing <tab> yields the second command (first second).

@Command(description = "x", command = {"first", "second"})

org.springframework.shell:spring-shell-starter:3.1.5

jvalkeal commented 11 months ago

Yes this would create command first second. There is an alias field in @Command you can use.

C-Otto commented 11 months ago

Thanks, I didn't know about the existence of alias.