Skip to content

CompletionResolvers for Array-Like Options #1147

@tschoellhorn

Description

@tschoellhorn

I have an issue regarding the CommandCompletion for @commands which have Options with an arity with ONE_OR_MORE.

I have a command like this:

@Command(command = "indexer index",)
public String index(	
@Option(
	longNames = "names", 
	required = false, 
	arity = OptionArity.ONE_OR_MORE
@OptionValues(provider = "snapshotConverter") Snapshot[] snaps) {
....
}

I also have implemented an CompletionResolver which makes proposals with possible matchin "Snapshots".

BUT: The CompletionResolver is only called for the first Option. When I separate the Options with empty space or comma my CompletionResover is not called any more. Yet, typing the complete "Snapshot"s results in the array of Snapshots.

So - is this a missing feature or is there some point I overlook?

Metadata

Metadata

Assignees

No one assigned

    Labels

    status/need-triageTeam needs to triage and take a first look

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions