0c63909ad3e8ed73d2b732396f2fd8ffffcf1b89

Author
Ian Chesal <ian.chesal@gmail.com>
Committer
Marc Cornellà <marc.cornella@live.com>
Date

Message

Fix default location of the virtualenvwrapper script (#6348)

The `virtualenvwrapper` script has been relocated to
`/usr/local/bin/virtualenvwrapper.sh`. Update the
plugin to look in the new location first. See:

http://virtualenvwrapper.readthedocs.io/en/latest/#introduction

to confirm the change in location for this script.

This addresses issue #3047 where the solution was to source this file
from your zshrc.

Diff

 1diff --git a/plugins/virtualenvwrapper/virtualenvwrapper.plugin.zsh b/plugins/virtualenvwrapper/virtualenvwrapper.plugin.zsh
 2index 6cd30732e7be10398f7c747b478e098713785084..484f18c9134b8c1f356ecfe6c0f546a0b6ea5cc0 100644
 3--- a/plugins/virtualenvwrapper/virtualenvwrapper.plugin.zsh
 4+++ b/plugins/virtualenvwrapper/virtualenvwrapper.plugin.zsh
 5@@ -6,6 +6,13 @@ if (( $+commands[$virtualenvwrapper] )); then
 6     unsetopt equals
 7     source ${${virtualenvwrapper}:c}
 8   }
 9+elif [[ -f "/usr/local/bin/virtualenvwrapper.sh" ]]; then
10+  function {
11+    setopt local_options
12+    unsetopt equals
13+    virtualenvwrapper="/usr/local/bin/virtualenvwrapper.sh"
14+    source "/usr/local/bin/virtualenvwrapper.sh"
15+  }
16 elif [[ -f "/etc/bash_completion.d/virtualenvwrapper" ]]; then
17   function {
18     setopt local_options