-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
feat(complete): Add descriptions to dynamic Zsh completions #5775
Conversation
a95db64
to
334a742
Compare
Also, I had to add this to my zshrc to prevent zsh from changing the order of suggestions: zstyle ':completion:*:*:my-program:*:*' sort false Not necessarily a problem, but it could be worth documenting, or maybe write it in the completion script? |
We generally want things sorted according to our order. We tweaked bash to ensure this. If you know how to do insert this in our script to be respected, please help us out and post a PR for this! |
I'll give it a try! (Not in this PR.) |
FYI the issue for zsh sorting is #5752 |
FYI I would classify this as a |
feat(complete): Include descriptions in zsh ### What does this PR try to resolve? See clap-rs/clap#5775 for more details ### How should we test and review this PR? If you're not a zsh user, you may need somthings like this to activate the completion system: ```shell # See https://zsh.sourceforge.io/Doc/Release/Completion-System.html autoload -Uz compinit compinit # and then source completion scripts source <(CARGO_COMPLETE=zsh target/debug/cargo) ``` ### Additional information
When using
unstable-dynamic
completions in Zsh, suggested values are not described. It's a step backwards compared to the default behavior and it makes things more difficult for users.I had a quick look and it seems relatively easy to fix. But I'm not familiar with either clap or Zsh autocompletion, so I may miss something here.