Skip to content

Commit

Permalink
[New] bash_completion: Add support for ZSH_DISABLE_COMPFIX flag.
Browse files Browse the repository at this point in the history
When using Oh My Zsh the ZSH_DISABLE_COMPFIX flag allows the zsh completion system to use files it deems to be insecure.
  • Loading branch information
NathanSMB authored and ljharb committed Sep 18, 2018
1 parent 2d97ce5 commit 0c2efed
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion bash_completion
Original file line number Diff line number Diff line change
Expand Up @@ -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

0 comments on commit 0c2efed

Please sign in to comment.