1
0
Fork 0

Add support for skipping VIRTUALENVWRAPPER init in modules/python (#598)

* Support skip-virtualenvwrapper-init zstyle in python module to avoid auto-sourcing of virtualenvwrapper.sh
* Don't overwrite the WORKON_HOME env var if the user has already set it
pull/715/merge
Calvin Smith 8 years ago committed by Kaleb Elwert
parent 5271af8180
commit a7729561e8

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

Loading…
Cancel
Save