From f3fa15745695e734e6e7f7288771a14afc1f40d4 Mon Sep 17 00:00:00 2001 From: hjoshi123 Date: Tue, 29 Dec 2020 08:35:08 +0530 Subject: [PATCH] [Fix] `bash_completion`: move compinit before bashcompinit --- bash_completion | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/bash_completion b/bash_completion index 0c872ee..e10138a 100644 --- a/bash_completion +++ b/bash_completion @@ -84,12 +84,13 @@ __nvm() { # called bashcompinit that will create a complete in ZSH. If the user is in # ZSH, load and run bashcompinit before calling the complete function. if [[ -n ${ZSH_VERSION-} ]]; then - autoload -U +X bashcompinit && bashcompinit + # Calling compinit first and then bashcompinit as mentioned by zsh man page. autoload -U +X compinit && if [[ ${ZSH_DISABLE_COMPFIX-} = true ]]; then compinit -u else compinit fi + autoload -U +X bashcompinit && bashcompinit fi complete -o default -F __nvm nvm