spring-shell
spring-shell copied to clipboard
Autocomplete ValueProvider is not invoked when argument have empty name
trafficstars
Using shell 2.0.0.RELEASE
My shell method looks like this
@ShellMethod(key = "ctx instance", value = "Gets or sets currently selected instance")
public void currentInstance(@ShellOption(value = {""}, valueProvider = MyProvider.class, defaultValue = ShellOption.NULL)
MyInstance instance) {
Now the goal of empty name is to allow for following invocations to work
ctx instance
ctx instance someValue
so the first variant is "read" and second is for writing.
However, in such configuration TAB does not invoke MyProvider provider. It works as expected if @ShellOption (value={"someParam"}) is given with an exception that argument must be named now.