Skip to content

Conversation

sepehr-rs
Copy link
Contributor

Fixes #13536

@sepehr-rs
Copy link
Contributor Author

Hi @notatallshaw,
I tried fixing the pre-commit issue, but it’s still showing the same error. Could you please take a closer look at the files and see if you can fix it? Thanks so much! :)

@sepehr-rs
Copy link
Contributor Author

Hi @notatallshaw, just checking in, do you have any updates on this?

Copy link
Member

@notatallshaw notatallshaw left a 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.

@sepehr-rs
Copy link
Contributor Author

Thanks a lot for the feedback!
I’ll work on fixing these issues, would love your feedback again once I push the updates.

@sepehr-rs
Copy link
Contributor Author

pre-commit.ci autofix

@sepehr-rs
Copy link
Contributor Author

Hi @notatallshaw, any updates?

@notatallshaw
Copy link
Member

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?

@sepehr-rs
Copy link
Contributor Author

pip completion is supposed to provide the user with a script to enable autocompletion. Typically, users set it up by adding something like this to their shell configuration file (e.g. .bashrc, .zshrc, etc.):

eval "$(pip completion --bash)"
# or
eval "$(pip completion --zsh)"

That way, the shell sources the completion code on startup.

@pfmoore
Copy link
Member

pfmoore commented Sep 19, 2025

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.

@notatallshaw
Copy link
Member

we need to include enough information for people who aren't familiar with how completion works to set it up "from scratch".

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

pip completion undocumented at pip.pypa.io
3 participants