From 3e778c440fee4de233265ddac268e35a09f0368f Mon Sep 17 00:00:00 2001 From: Carlo Sala Date: Mon, 3 Aug 2026 22:38:49 +0200 Subject: [PATCH] fix: do not try to load old completion with new version Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com> --- plugins/pipenv/pipenv.plugin.zsh | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/plugins/pipenv/pipenv.plugin.zsh b/plugins/pipenv/pipenv.plugin.zsh index 8bb707dd8..802641a0e 100644 --- a/plugins/pipenv/pipenv.plugin.zsh +++ b/plugins/pipenv/pipenv.plugin.zsh @@ -24,13 +24,14 @@ fi [[ -n "$_pipenv_fresh_version" ]] && print -r -- "$_pipenv_fresh_version" >| "$_pipenv_version_cache" } &| -if is-at-least 2026.5.0 "$_pipenv_version" && (( $+commands[register-python-argcomplete] )); then - # argcomplete-based completion - autoload -Uz bashcompinit - bashcompinit - - eval "$(register-python-argcomplete pipenv)" +if is-at-least 2026.5.0 "$_pipenv_version"; then + # pipenv >= 2026.5.0: argcomplete-based completion (no legacy fallback) + if (( $+commands[register-python-argcomplete] )); then + autoload -Uz bashcompinit + bashcompinit + eval "$(register-python-argcomplete pipenv)" + fi else # legacy Click-based completion via _PIPENV_COMPLETE