mirror of
https://github.com/ohmyzsh/ohmyzsh.git
synced 2026-08-07 06:08:39 +02:00
fix(pipenv): use argcomplete for pipenv >= 2026.5.0
pipenv >= 2026.5.0 dropped the _PIPENV_COMPLETE environment variable and switched to argcomplete for shell completions. Check for register-python-argcomplete command and use it when available, falling back to the old _PIPENV_COMPLETE method for older pipenv versions. Fixes #13719
This commit is contained in:
parent
5181447da8
commit
d01d10e50b
1 changed files with 6 additions and 1 deletions
|
|
@ -10,7 +10,12 @@ if [[ ! -f "$ZSH_CACHE_DIR/completions/_pipenv" ]]; then
|
|||
_comps[pipenv]=_pipenv
|
||||
fi
|
||||
|
||||
_PIPENV_COMPLETE=zsh_source pipenv >| "$ZSH_CACHE_DIR/completions/_pipenv" &|
|
||||
# pipenv >= 2026.5.0 dropped _PIPENV_COMPLETE in favor of argcomplete
|
||||
if (( $+commands[register-python-argcomplete] )); then
|
||||
register-python-argcomplete pipenv >| "$ZSH_CACHE_DIR/completions/_pipenv" &|
|
||||
else
|
||||
_PIPENV_COMPLETE=zsh_source pipenv >| "$ZSH_CACHE_DIR/completions/_pipenv" &|
|
||||
fi
|
||||
|
||||
if zstyle -T ':omz:plugins:pipenv' auto-shell; then
|
||||
# Automatic pipenv shell activation/deactivation
|
||||
|
|
|
|||
Loading…
Reference in a new issue