From 1e522278641cb5d81bc5e0be03030fd06ddf99f3 Mon Sep 17 00:00:00 2001 From: Zorion Arrizabalaga Date: Mon, 27 Oct 2025 11:09:15 +0100 Subject: [PATCH] Suppress error "command not found: compdef". --- uv-virtualenvwrapper.sh | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/uv-virtualenvwrapper.sh b/uv-virtualenvwrapper.sh index 4cfdd8b..b132500 100644 --- a/uv-virtualenvwrapper.sh +++ b/uv-virtualenvwrapper.sh @@ -106,7 +106,9 @@ __uvvirtualenvwrapper_setup() { venvs=($(lsvirtualenv)) _describe 'virtualenvs' venvs } - compdef _virtualenvs workon rmvirtualenv + if typeset -f compdef >/dev/null; then + compdef _virtualenvs workon rmvirtualenv + fi fi } __uvvirtualenvwrapper_setup \ No newline at end of file