From 780a6979d1d211eda66642801b9de2b5f8422387 Mon Sep 17 00:00:00 2001 From: Ian Chesal Date: Mon, 9 Oct 2017 16:02:21 -0700 Subject: [PATCH] Fix default location of the virtualenvwrapper script 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. --- plugins/virtualenvwrapper/virtualenvwrapper.plugin.zsh | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/plugins/virtualenvwrapper/virtualenvwrapper.plugin.zsh b/plugins/virtualenvwrapper/virtualenvwrapper.plugin.zsh index 6cd30732..484f18c9 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