From 0c63909ad3e8ed73d2b732396f2fd8ffffcf1b89 Mon Sep 17 00:00:00 2001 From: Ian Chesal Date: Sun, 13 May 2018 12:56:46 -0700 Subject: 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. --- plugins/virtualenvwrapper/virtualenvwrapper.plugin.zsh | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'plugins/virtualenvwrapper') 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 -- cgit v1.2.3-70-g09d2 From 90a5bd06ca76aff04f76a5d43a432ed9340dd78d Mon Sep 17 00:00:00 2001 From: Lorenzo Bolla Date: Sat, 26 May 2018 19:44:49 +0100 Subject: Prefer virtualenvwrapper_lazy (#6842) This gives much faster start up times and only loads virtualenvwrapper when needed. Fix #6839 --- plugins/virtualenvwrapper/virtualenvwrapper.plugin.zsh | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'plugins/virtualenvwrapper') diff --git a/plugins/virtualenvwrapper/virtualenvwrapper.plugin.zsh b/plugins/virtualenvwrapper/virtualenvwrapper.plugin.zsh index 484f18c91..2a7c0b92a 100644 --- a/plugins/virtualenvwrapper/virtualenvwrapper.plugin.zsh +++ b/plugins/virtualenvwrapper/virtualenvwrapper.plugin.zsh @@ -1,6 +1,14 @@ virtualenvwrapper='virtualenvwrapper.sh' +virtualenvwrapper_lazy='virtualenvwrapper_lazy.sh' -if (( $+commands[$virtualenvwrapper] )); then +if (( $+commands[$virtualenvwrapper_lazy] )); then + function { + setopt local_options + unsetopt equals + virtualenvwrapper=${${virtualenvwrapper_lazy}:c} + source ${${virtualenvwrapper_lazy}:c} + } +elif (( $+commands[$virtualenvwrapper] )); then function { setopt local_options unsetopt equals -- cgit v1.2.3-70-g09d2 From f461d21de1bd0c1394e57a2e3af69778692e4ba4 Mon Sep 17 00:00:00 2001 From: Marc Cornellà Date: Wed, 6 Jun 2018 17:14:19 +0200 Subject: 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 --- plugins/virtualenvwrapper/virtualenvwrapper.plugin.zsh | 1 + 1 file changed, 1 insertion(+) (limited to 'plugins/virtualenvwrapper') 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 { -- cgit v1.2.3-70-g09d2