Browse Source

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
master
Calvin Smith 8 years ago committed by Kaleb Elwert
parent
commit
a7729561e8
  1. 7
      modules/python/init.zsh

7
modules/python/init.zsh

@ -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