浏览代码

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
Marc Cornellà 6 年之前
父节点
当前提交
f461d21de1
共有 1 个文件被更改,包括 1 次插入0 次删除
  1. 1 0
      plugins/virtualenvwrapper/virtualenvwrapper.plugin.zsh

+ 1 - 0
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 {