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

Commands offered when value should be expected

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

public void command(
@ShellOption(ValueProvider = AgeProvider.class) Integer age,
@ShellOption(ValueProvider = NameProvider.class) String name
) { ...

when I do command --age TAB the autocomplete system correctly shows the options returned by the ValueProvider AgeProvider, but it also shows autocomplete options for the next argument key e.g. --help or --name. This should not happen, because age has arity 1 and so --age must be followed by exactly 1 value from the ValueProvider.

--age TAB
others:
--help
--name
Values:
1
2
3

command --age 1 is correct. command --age --name --help is clearly nonsense, but legitimate according to tab-completion.

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

any view on this from triage?

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

Duplicate of #511?

C-Otto avatar Nov 10 '23 08:11 C-Otto