[New] `bash_completion`: Add support for `ZSH_DISABLE_COMPFIX` flag.
When using Oh My Zsh the ZSH_DISABLE_COMPFIX flag allows the zsh completion system to use files it deems to be insecure.
parent
2d97ce5f7b
commit
0c2efed407
|
@ -85,7 +85,11 @@ __nvm() {
|
|||
# ZSH, load and run bashcompinit before calling the complete function.
|
||||
if [[ -n ${ZSH_VERSION-} ]]; then
|
||||
autoload -U +X bashcompinit && bashcompinit
|
||||
autoload -U +X compinit && compinit
|
||||
autoload -U +X compinit && if [[ ${ZSH_DISABLE_COMPFIX-} = true ]]; then
|
||||
compinit -u
|
||||
else
|
||||
compinit
|
||||
fi
|
||||
fi
|
||||
|
||||
complete -o default -F __nvm nvm
|
||||
|
|
Loading…
Reference in New Issue