spring-shell icon indicating copy to clipboard operation
spring-shell copied to clipboard

ValueProvider not invoked for array types when autocompleting

Open daniel-b2c2 opened this issue 1 year ago • 2 comments

I have a ValueProvider that returns a list of possible values say A,B,C,D

@ShellOption(defaultValue = "", valueProvider = EnvironmentAwareClusterProvider.class) String[] clusters)

The first tab invocation brings up a list of options

--clusters <TAB> 
A 
B 
C
D

The second tab invocation brings up only commands, but it should also offer the valueProvider options again, because this is an array, so it can have more than one value.

--clusters A <TAB>
--help

So it should look like this

--clusters A <TAB>
--help
A
B
C
D

daniel-b2c2 avatar Jun 20 '23 09:06 daniel-b2c2

We should also try to see if there's arity settings as it can give upper bound size to array/collection.

jvalkeal avatar Jun 20 '23 11:06 jvalkeal

is this tagged correctly? seems to be the only thing in 3.1.x milestone....

daniel-b2c2 avatar Sep 07 '23 01:09 daniel-b2c2