-
Notifications
You must be signed in to change notification settings - Fork 395
Incorrect completion for options #495
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
Comments
This feels a regression from a rework. We moved closer to jline what comes for completion and getting both parameters is coming from there which we need to fix as it's wrong and annoying. Thanks for reporting as I now see the issue you mention about second provider not getting called if first argument is already completed and placed in a command line. |
- This commit fixes two issues. - Firstly complete with correct option as existing bug was to wrongly always complete with first option which used wrong provider. - Secondly filter out duplicate option proposals giving better result when options is already in place. - Fixes spring-projects#495
- This commit fixes two issues. - Firstly complete with correct option as existing bug was to wrongly always complete with first option which used wrong provider. - Secondly filter out duplicate option proposals giving better result when options is already in place. - Fixes #495
- This commit fixes two issues. - Firstly complete with correct option as existing bug was to wrongly always complete with first option which used wrong provider. - Secondly filter out duplicate option proposals giving better result when options is already in place. - Backport #495 - Fixes #498 (cherry picked from commit a143d25)
Hi @bmiller1009, I have the same issue with ValueProviderSupport. I wonder if you could share with me your solution for using the new API. Thanks. |
I'm testing out the new 2.1.0 release and it looks like the ValueProviderSupport class has been deprecated. I have a flow where I have multiple parameters which need a value provider and the suggested value from the first returned and used to filter the value provider for the second.
Currently tabbing on ValueProvider for the first parameter returns the correctly it also incorrectly returns both parameters in addition to the provided value. The second ValueProvider seems never to be triggered.
I am using Kotlin, and my method signature would look something like this:
@ShellMethod("Get details")
fun getDetails(
@ShellOption(valueProvider = TestValueProvider1::class) test1: String,
@ShellOption(valueProvider = TestValueProvider2::class) test2: String
)
In the 2.0.0 API I used ValueProviderSupport and this gave me exactly what I needed. What is the correct way to achieve this now in 2.1.x?
The text was updated successfully, but these errors were encountered: