mirror of
https://github.com/ohmyzsh/ohmyzsh.git
synced 2024-11-19 21:41:07 +01:00
use local options to set no_equals before sourcing bash completion script
This commit is contained in:
parent
e55d84f76e
commit
d0b690b584
1 changed files with 11 additions and 3 deletions
|
@ -1,10 +1,18 @@
|
||||||
virtualenvwrapper='virtualenvwrapper.sh'
|
virtualenvwrapper='virtualenvwrapper.sh'
|
||||||
|
|
||||||
if (( $+commands[$virtualenvwrapper] )); then
|
if (( $+commands[$virtualenvwrapper] )); then
|
||||||
|
function {
|
||||||
|
setopt local_options
|
||||||
|
unsetopt equals
|
||||||
source ${${virtualenvwrapper}:c}
|
source ${${virtualenvwrapper}:c}
|
||||||
|
}
|
||||||
elif [[ -f "/etc/bash_completion.d/virtualenvwrapper" ]]; then
|
elif [[ -f "/etc/bash_completion.d/virtualenvwrapper" ]]; then
|
||||||
|
function {
|
||||||
|
setopt local_options
|
||||||
|
unsetopt equals
|
||||||
virtualenvwrapper="/etc/bash_completion.d/virtualenvwrapper"
|
virtualenvwrapper="/etc/bash_completion.d/virtualenvwrapper"
|
||||||
source "/etc/bash_completion.d/virtualenvwrapper"
|
source "/etc/bash_completion.d/virtualenvwrapper"
|
||||||
|
}
|
||||||
else
|
else
|
||||||
print "zsh virtualenvwrapper plugin: Cannot find ${virtualenvwrapper}.\n"\
|
print "zsh virtualenvwrapper plugin: Cannot find ${virtualenvwrapper}.\n"\
|
||||||
"Please install with \`pip install virtualenvwrapper\`" >&2
|
"Please install with \`pip install virtualenvwrapper\`" >&2
|
||||||
|
|
Loading…
Reference in a new issue