diff options
author | Marc Cornellà <marc.cornella@live.com> | 2018-06-06 17:14:19 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-06-06 17:14:19 +0200 |
commit | f461d21de1bd0c1394e57a2e3af69778692e4ba4 (patch) | |
tree | c7fd6bed80532518a74e5bb57b45e079a3b4f7a7 | |
parent | 6ace3cd18dd3cbc0e2631fa98051194b703fe4d7 (diff) | |
download | zsh-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.zsh | 1 |
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 { |