Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CompletionResolvers for Array-Like Options #1147

Open
tschoellhorn opened this issue Oct 9, 2024 · 0 comments
Open

CompletionResolvers for Array-Like Options #1147

tschoellhorn opened this issue Oct 9, 2024 · 0 comments
Labels
status/need-triage Team needs to triage and take a first look

Comments

@tschoellhorn
Copy link

tschoellhorn commented Oct 9, 2024

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?

@github-actions github-actions bot added the status/need-triage Team needs to triage and take a first look label Oct 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
status/need-triage Team needs to triage and take a first look
Projects
None yet
Development

No branches or pull requests

1 participant