diff --git a/modules/python/init.zsh b/modules/python/init.zsh index da78ea79..458253b2 100644 --- a/modules/python/init.zsh +++ b/modules/python/init.zsh @@ -34,10 +34,11 @@ if (( ! $+commands[python] && ! $+commands[pyenv] )); then return 1 fi -# Load virtualenvwrapper into the shell session. -if (( $+commands[virtualenvwrapper.sh] )); then +# Load virtualenvwrapper into the shell session, unless requested not to +zstyle -t ':prezto:module:python' skip-virtualenvwrapper-init +if (( $? && $+commands[virtualenvwrapper.sh] )); then # Set the directory where virtual environments are stored. - export WORKON_HOME="$HOME/.virtualenvs" + export WORKON_HOME="${WORKON_HOME:-$HOME/.virtualenvs}" # Disable the virtualenv prompt. VIRTUAL_ENV_DISABLE_PROMPT=1