Skip to content
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

Completion in ZSH doesn't understand that arguments follow certain options #4955

Closed
segevfiner opened this issue Jan 5, 2018 · 1 comment · Fixed by #11417
Closed

Completion in ZSH doesn't understand that arguments follow certain options #4955

segevfiner opened this issue Jan 5, 2018 · 1 comment · Fixed by #11417
Labels
C: autocomplete Autocompletion in shells (pip completion) type: enhancement Improvements to functionality

Comments

@segevfiner
Copy link
Contributor

  • Pip version: 9.0.1
  • Python version: 2.7.12
  • Operating system: Ubuntu 16.04

Description:

Completion in Zsh uses the older compctl builtin and returns completions for long options that take arguments with a trailing equals sign. But compctl/Zsh doesn't understand that as meaning that the option takes an argument and adds a space after the equals sign and also tries to complete the next argument if you remove the equals sign as yet another option.

No idea if this is fixable using the older compctl, might want to migrate to the newer compsys... With compsys you will probably have to modify the completion output from Pip or preprocess it in shell code so that it fits what something like _arguments expects.

#4842 will make it complete file names by re-implementing that inside pip instead of letting the shell handle it which means certain stuff like colored file names won't work or zstyle related settings for file name completion. And it still won't fix the fact that Zsh will add a space after the equals sign...

What I've run:

➜ pip install --requirem<tab>
➜ pip install --requirement= # With a space
➜ pip install --requirement=<tab> # Nothing
➜ pip install --requirement= <tab>
➜ pip install --requirement= -- # Sigh...
@pradyunsg pradyunsg added the S: needs triage Issues/PRs that need to be triaged label May 11, 2018
@xavfernandez xavfernandez added the C: autocomplete Autocompletion in shells (pip completion) label Jun 29, 2018
@chrahunt chrahunt added the type: enhancement Improvements to functionality label Jul 26, 2019
@triage-new-issues triage-new-issues bot removed the S: needs triage Issues/PRs that need to be triaged label Jul 26, 2019
@chrahunt
Copy link
Member

Maybe there's some possibility to collaborate with #5364.

This was referenced Aug 26, 2022
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Aug 14, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
C: autocomplete Autocompletion in shells (pip completion) type: enhancement Improvements to functionality
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants