Skip to content

Interactive completion for positional arguments not working #923

@C-Otto

Description

@C-Otto

I migrated my code from version 2.0 to 3.1.5. Both with the new @Command syntax and with the old @ShellMethod variant I fail to get tab completion to work when I do NOT specify the parameter name via "--value". Everything works as expected when I add "--value" before the to-be-completed value.

This works:
someCommand --value val<tab>

This does not work:
someCommand val<tab>

With @ShellMethod (BarProvider implements ValueProvider):

@ShellMethod("description")
public String someCommand(
        @ShellOption(valueProvider = BarProvider.class) SomeType value
)

With @Command (BarProvider implements CompletionProvider):

@Command(description = "description")
public String someCommand(
        @Option(required = true, arity = EXACTLY_ONE) @OptionValues(provider = "barProvider") SomeType value
)

Am I missing something?

PS: Thanks for the resurrection of this project!

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions