-
Notifications
You must be signed in to change notification settings - Fork 424
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
Feature Request: fish completion #725
Comments
Thanks for the suggestion! Do you think you’ll be able to provide a pull request? |
@remkop Fair question, It's unlikely I will in next 6 months due to
So feel free to close this and #726 but it's so palpably close to what I need to delete a tone of code in my own apps. Feel free to close, this is a suggestion, I don't have plans to actively work on this. |
No worries! It is great if people can contribute a PR, so I always ask :-) I wasn’t aware of fish shell. I had a quick look and it may be quite straightforward to generate a completion script from the picocli model. |
It's a great choice for your interactive (only) shell. And in the examples above you can see how sensible the completion logic is.
-s is short option, -l is long option with -- prefix, and -d is description. |
Yes that looks straightforward. I need to look a bit further to see how subcommands (and nested sub-subcommands) are handled, and whether there's a facility for completing options that don't look like POSIX short options or GNU long options (like Update: Useful links:
|
Are there any news? |
@benkeil I haven’t looked at this. My time available to spend on picocli is unfortunately extremely limited. Pull requests are very welcome. 😅 |
I've made some very dirty proof of concept realization for fish completion in #1925 It successfully generated completion for my simple app, but it's definitely not universal at the moment. If anybody interested, they can try to generate completion for their app from #1925 |
I think fish completion is generally much simpler than bash e.g. see examples below with baked in completions "atlassian github" etc. But the functions at the top actually use the command itself to generate context sensitive completions by calling the code inside the app. Good for URLs etc.
https://github.com/yschimke/cooee-cli/blob/master/src/dist/fish/cooee.fish
The text was updated successfully, but these errors were encountered: