-
Notifications
You must be signed in to change notification settings - Fork 413
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
AutoComplete Command not found #636
Comments
When you say
do you mean when you type this in the bash shell? Have you tried putting a
|
Thank you for the quick response, yes I tried, same result. Yes, I mean bash shell. |
Did you create a shell script for the You can also create it yourself. Something like this:
(but replace the above with the correct value for LIBS, the correct jar name and the correct fully qualified class name) You should make this shell script executable with:
|
Yes, sir I created. And it works fine, when I type: --exit --generateKey --help --sign --verify ` But, when I choose: licenserES --help It gives me this message : licenserES: command not found |
I believe this is the bash shell telling you it cannot find the |
By the way, the |
No, I don't have that file. Only licenserES_completion. But I did this step :
Am I supposed to do and this?
|
Yes, you need both scripts. Sounds like you already have the |
I tried to add '--writeCommandScript' when running picocli.Autocomplete. But gives me this error : What value do I need to pass for '--writeCommandScript' ? |
Can you please show the exact command you used to run |
Okay, thanks for the clarification. Please specify
|
By the way (unrelated): I strongly recommend everyone to upgrade to picocli 3.9.5 (see release notes) to protect against a bug in jansi-1.14 that may crash the JVM on some versions of Linux with some versions of Java. |
Sir, here are my last updates, I was able to generate 2 files [ licenserES ] and [ licenserES_completion ].
and made it executable. Now I type the following : ./licenserES [TAB] [TAB,] I get my options. Error: Unable to initialize main class com.esempla.licenser.LicenseCommandLine So it seems like a problem with my Main class? Thanks. |
You also need the picocli jar in the classpath. One way to do this, in your
(and make sure the picocli jar exists in the |
Thank you a lot, Sir ! |
You may need to source the |
I figured it out. Thank you again for your support ! |
Glad to hear I was able to help. Don't forget to star picocli if you like it! :-) |
Sorry, my last question. What can I do, so I don't have to run like this ./licenserES ?
|
Already did :) 👍 |
To be honest, I don’t know why the Is the script executable? (Did you Perhaps you can find the answer to that question on StackOverflow. We’re surely not the first people to have this issue. |
Yes, I did. Okay, thank you one more time ! |
@remkop Hello, Mr. Pompa. I tried to find myself, but was not able. Is autocomplete working with @parameters ? Or only with @option? Thanks |
Current support for completion on positional parameters is limited. There are some outstanding tickets to improve this, but I’m unable to work on that now. |
@remkop Thanks |
@remkop sorry :) ..for subcommands options, is AutoComplete possible? |
Yes, options on subcommands (and nested sub-subcommands) should work. |
Hello and thank you for this beautiful library.
I am new to picocli, so I want to implement a menu with autocomplete possibility.
My code is the following :
When I run this class from IDE, it works fine, it shows me the menu:
After I generated my licenserES_completion, and the source of this script. AutoComplete works fine if a write licenserES ---> it will show me these options, but if I type licenserES --help ...it keeps saying licenserES command not found. Any sugestions on this? Or maybe you have a good example.
Thanks in advance !
The text was updated successfully, but these errors were encountered: