-
Notifications
You must be signed in to change notification settings - Fork 218
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
OptionCompleter documentation #502
Comments
The code snippet from wiki:
optionCompleterTest script I think the fastest way to experiment and test optionCompleter is to use the script. After you have build the JLine project launch the script by entering command
|
Thank you for the clarification, mattir! Now I understand better the code that I attempted to copy from picocli shell, and I'm able to use both I'm still unable to make the completers generated by my code from the Here is an example of hand-made completer which exhibits the same kind of malfunction, similar to what is generated by my code:
Am I not supposed to used |
I have not used |
Thank you for the help, mattirn. I ended up creating a tree of
|
Hello.
I'm trying to understand how to specify completion for the options of my
CliktCommand
(from Clikt) to jline3, but my code — which is inspired by Picocli Shell — is not working as expected: the resulting shell can complete the nested commands but not the options.Here's the relevant code, in the form of extension methods for the CliktCommand class:
Could you explain what is the meaning of the parameters of this constructor?
OptionCompleter(org.jline.reader.Completer completer, Map<String,List<String>> optionValues, Collection<String> options, int startPos)
What is
completer
going to complete?Should
startPos
be greater if I'm dealing with a nested command?In this piece of code from the wiki:
what is
this::commandOptions
supposed to be? What are those"p1"
,"p11"
, etc.? I could run theTreeCompleter
snippet from the same wiki and check what it does, but it's not possible to run this other one.Thanks for reading.
The text was updated successfully, but these errors were encountered: