From 0c2efed407e1c10d769df237ff4e5adba01f79c5 Mon Sep 17 00:00:00 2001 From: Nathan Burchill Date: Tue, 18 Sep 2018 16:15:35 -0400 Subject: [PATCH] [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. --- bash_completion | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/bash_completion b/bash_completion index 7a3a5c0..0c872ee 100644 --- a/bash_completion +++ b/bash_completion @@ -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