From cd45c41cfe8c7e4d643e6cb92bb9b4b454924f9c Mon Sep 17 00:00:00 2001 From: Benjamin Mundt Date: Thu, 11 Jul 2024 12:33:04 -0400 Subject: [PATCH] make sure virtualenvwrapper_cd always tries to do something, even when it cannot infer the current shell --- virtualenvwrapper.sh | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/virtualenvwrapper.sh b/virtualenvwrapper.sh index 66f0f07..4ed4de8 100644 --- a/virtualenvwrapper.sh +++ b/virtualenvwrapper.sh @@ -117,12 +117,11 @@ fi # cd because we are trying to change the state of the current shell, # so we use "builtin". function virtualenvwrapper_cd { - if [ -n "${BASH:-}" ] - then - builtin \cd "$@" - elif [ -n "${ZSH_VERSION:-}" ] + if [ -n "${ZSH_VERSION:-}" ] then builtin \cd -q "$@" + else + builtin \cd "$@" fi }