From 76291712394e3d30f3522919f33b28fdf7899ea5 Mon Sep 17 00:00:00 2001 From: eukaryote Date: Fri, 10 Oct 2014 22:37:42 -0700 Subject: [PATCH] support skip-virtualenvwrapper-init zstyle in python module to avoid auto-sourcing of virtualenvwrapper.sh --- modules/python/init.zsh | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/modules/python/init.zsh b/modules/python/init.zsh index da78ea79..b373028f 100644 --- a/modules/python/init.zsh +++ b/modules/python/init.zsh @@ -34,8 +34,9 @@ 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"