-
Notifications
You must be signed in to change notification settings - Fork 3.1k
Add pip completion documentation #13542
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
base: main
Are you sure you want to change the base?
Conversation
Hi @notatallshaw, |
Hi @notatallshaw, just checking in, do you have any updates on this? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've checked out locally and reproduced the CI errors, I've added comments to help, let me know if you need me to push these commits or if you can handle it.
Thanks a lot for the feedback! |
pre-commit.ci autofix |
Hi @notatallshaw, any updates? |
I've never used this feature and am unfamiliar with how to use it. Just reading the docs you've added: https://pip--13542.org.readthedocs.build/en/13542/cli/pip_completion/ I still don't know how to use this feature. The feature outputs some code to the stdout, and then what? What am I supposed to do with that? Or is the command doing something else? |
eval "$(pip completion --bash)"
# or
eval "$(pip completion --zsh)" That way, the shell sources the completion code on startup. |
I think the point here is that if we're going to document this, we need to include enough information for people who aren't familiar with how completion works to set it up "from scratch". That's going to involve having shell-specific instructions for all the shells we support. |
Yes exactly, I don't find the current "Examples" section particularly helpful, I would rather see "Example Setups" for each shell supported, so for the Bash example I would prefer to see something like: echo 'eval "$(pip completion --bash)"' >> ~/.bashrc If that's a way to add it to Bash. |
Fixes #13536