-
-
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
Document how to source completions #2488
Comments
I'd like to give a simple and general description:
I don't have much experience with other shells so additions welcome. |
Hmm, that makes me wonder if there wouldn't be any reason not to update the output of
Where
One could certainly do that at the app-level, but is there no reason to build that directly into the completions output of clap? |
@nicholastmosher I can't say for sure, but I think generally clap completions are generated at packaging time. That is to say, when you install a program from the package manager, it comes with the completions placed at the suitable location so shells will pick them up automatically. Manually sourcing the completions is not the usual way people use it. |
Ah I see. I was taking inspiration from the oh-my-zsh |
For me I had to do 2 things to get it working with ZSH 5.8 (
Unsure why this is not happening by default, is this a bug? Also, if there's any backticks in any help message, the shell tries to interpret it due to shell expansion, suspect it's related to #1596 |
The I'm inclined to consider this closed but would be open to input from others on if there is concern over that vs the current code-generated completions. |
Please complete the following tasks
Clap Version
3.0.0-beta.2
Where?
clap_generate
What's wrong?
Currently, clap generates completions without providing any insight into how to actually get them running in the shell.
How to fix?
It would be nice if we could specify (for each shell):
The text was updated successfully, but these errors were encountered: