Skip to content

Commit

Permalink
use local options to set no_equals before sourcing bash completion sc…
Browse files Browse the repository at this point in the history
…ript
  • Loading branch information
tcwang817 authored and ncanceill committed Jun 13, 2015
1 parent e55d84f commit d0b690b
Showing 1 changed file with 11 additions and 3 deletions.
14 changes: 11 additions & 3 deletions plugins/virtualenvwrapper/virtualenvwrapper.plugin.zsh
Original file line number Diff line number Diff line change
@@ -1,10 +1,18 @@
virtualenvwrapper='virtualenvwrapper.sh'

if (( $+commands[$virtualenvwrapper] )); then
source ${${virtualenvwrapper}:c}
function {
setopt local_options
unsetopt equals
source ${${virtualenvwrapper}:c}
}
elif [[ -f "/etc/bash_completion.d/virtualenvwrapper" ]]; then
virtualenvwrapper="/etc/bash_completion.d/virtualenvwrapper"
source "/etc/bash_completion.d/virtualenvwrapper"
function {
setopt local_options
unsetopt equals
virtualenvwrapper="/etc/bash_completion.d/virtualenvwrapper"
source "/etc/bash_completion.d/virtualenvwrapper"
}
else
print "zsh virtualenvwrapper plugin: Cannot find ${virtualenvwrapper}.\n"\
"Please install with \`pip install virtualenvwrapper\`" >&2
Expand Down

0 comments on commit d0b690b

Please sign in to comment.