summaryrefslogtreecommitdiff
path: root/plugins/virtualenvwrapper
diff options
context:
space:
mode:
authorIan Chesal <ian.chesal@gmail.com>2018-05-13 12:56:46 -0700
committerMarc Cornellà <marc.cornella@live.com>2018-05-13 21:56:46 +0200
commit0c63909ad3e8ed73d2b732396f2fd8ffffcf1b89 (patch)
tree9c71753a54578615482c38f6720d721d31aecaa3 /plugins/virtualenvwrapper
parentd02d008579e8b1e17cb86f2a03286f823a9fb773 (diff)
downloadzsh-0c63909ad3e8ed73d2b732396f2fd8ffffcf1b89.tar.gz
zsh-0c63909ad3e8ed73d2b732396f2fd8ffffcf1b89.tar.bz2
zsh-0c63909ad3e8ed73d2b732396f2fd8ffffcf1b89.zip
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.
Diffstat (limited to 'plugins/virtualenvwrapper')
-rw-r--r--plugins/virtualenvwrapper/virtualenvwrapper.plugin.zsh7
1 files changed, 7 insertions, 0 deletions
diff --git a/plugins/virtualenvwrapper/virtualenvwrapper.plugin.zsh b/plugins/virtualenvwrapper/virtualenvwrapper.plugin.zsh
index 6cd30732e..484f18c91 100644
--- a/plugins/virtualenvwrapper/virtualenvwrapper.plugin.zsh
+++ b/plugins/virtualenvwrapper/virtualenvwrapper.plugin.zsh
@@ -6,6 +6,13 @@ if (( $+commands[$virtualenvwrapper] )); then
unsetopt equals
source ${${virtualenvwrapper}:c}
}
+elif [[ -f "/usr/local/bin/virtualenvwrapper.sh" ]]; then
+ function {
+ setopt local_options
+ unsetopt equals
+ virtualenvwrapper="/usr/local/bin/virtualenvwrapper.sh"
+ source "/usr/local/bin/virtualenvwrapper.sh"
+ }
elif [[ -f "/etc/bash_completion.d/virtualenvwrapper" ]]; then
function {
setopt local_options