-
Notifications
You must be signed in to change notification settings - Fork 71
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
Idea: Add a zsh-completions output extension #250
Comments
Yeah, I think this would be a cool enhancement! Some quick thoughts:
I'm unlikely to work on this myself, but I'd certainly be open to contributions of this shape! Labelling as such. |
To add to bkirwi: When this will be done, I suggest to make it a general extension with support for multiple shells from the start (even if only one gets implemented initially). |
One change that could make it easier to experiment with this and other enhancements may be providing access to some of the |
FYI I have a POC of this for zsh and I'm going to try and generalize it so it doesn't work with just my app. Current work in kubukoz/spotify-next@d3f0d92 (It needs to come from the |
Since it's come up in this thread, a quick note on why the
|
Would it be possible to expose a method to emit a public ADT (possibly, but not necessarily, one of the two you mentioned)? That way the internal performance optimizations aren't perturbed, and nobody has to pay for the cost of the more expensive representation unless they need it to do something unusual like generating completions or prototyping functionality (one I've wanted to explore is generating linked markdown readme files, which would greatly benefit from being able to traverse the subcommand tree). |
One idea, which came up in the context of #138, would be to capture more structural information in the (In that context, we could satisfy the distributive law by converting the "distributed" representation on the right-hand side to the undistributed form on the left. That's not an option for the original AST because we can't check function equality, but in the context of |
I think most of the mac users are using zsh instead of bash. zsh has this awesome plugin for auto completion. I think it could be a great extension for "decline" to autogenerate this zsh-autocompletion output from the Opts. I have seen this output in several CLIs like kubectl for kubernetes (
source <(kubectl completion zsh)
).So my suggestion is to build an plugin for decline that generates the needed output for example with
./my-decline-cli completion zsh
. Perhaps as "com.monovore" %% "decline-zsh-completions" % "1.3.0"?The text was updated successfully, but these errors were encountered: