summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarc Cornellà <marc.cornella@live.com>2018-06-06 17:14:19 +0200
committerGitHub <noreply@github.com>2018-06-06 17:14:19 +0200
commitf461d21de1bd0c1394e57a2e3af69778692e4ba4 (patch)
treec7fd6bed80532518a74e5bb57b45e079a3b4f7a7
parent6ace3cd18dd3cbc0e2631fa98051194b703fe4d7 (diff)
downloadzsh-f461d21de1bd0c1394e57a2e3af69778692e4ba4.tar.gz
zsh-f461d21de1bd0c1394e57a2e3af69778692e4ba4.tar.bz2
zsh-f461d21de1bd0c1394e57a2e3af69778692e4ba4.zip
virtualenvwrapper: set $WORKON_HOME if undefined
This uses the default that virtualenvwrapper.sh would set if it was called. If the user changes its value after the plugin is loaded, the plugin will work all the same. Fixes #6882 Closes #6870 Closes #6883
-rw-r--r--plugins/virtualenvwrapper/virtualenvwrapper.plugin.zsh1
1 files changed, 1 insertions, 0 deletions
diff --git a/plugins/virtualenvwrapper/virtualenvwrapper.plugin.zsh b/plugins/virtualenvwrapper/virtualenvwrapper.plugin.zsh
index 2a7c0b92a..e27c6bb76 100644
--- a/plugins/virtualenvwrapper/virtualenvwrapper.plugin.zsh
+++ b/plugins/virtualenvwrapper/virtualenvwrapper.plugin.zsh
@@ -7,6 +7,7 @@ if (( $+commands[$virtualenvwrapper_lazy] )); then
unsetopt equals
virtualenvwrapper=${${virtualenvwrapper_lazy}:c}
source ${${virtualenvwrapper_lazy}:c}
+ [[ -z "$WORKON_HOME" ]] && WORKON_HOME="$HOME/.virtualenvs"
}
elif (( $+commands[$virtualenvwrapper] )); then
function {