mirror of
https://github.com/dcarrillo/prezto.git
synced 2024-12-22 12:48:01 +00:00
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
This commit is contained in:
parent
5271af8180
commit
a7729561e8
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user