[Fix] `bash_completion`: move compinit before bashcompinit
parent
6982dee071
commit
f3fa157456
|
@ -84,12 +84,13 @@ __nvm() {
|
||||||
# called bashcompinit that will create a complete in ZSH. If the user is in
|
# called bashcompinit that will create a complete in ZSH. If the user is in
|
||||||
# ZSH, load and run bashcompinit before calling the complete function.
|
# ZSH, load and run bashcompinit before calling the complete function.
|
||||||
if [[ -n ${ZSH_VERSION-} ]]; then
|
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
|
autoload -U +X compinit && if [[ ${ZSH_DISABLE_COMPFIX-} = true ]]; then
|
||||||
compinit -u
|
compinit -u
|
||||||
else
|
else
|
||||||
compinit
|
compinit
|
||||||
fi
|
fi
|
||||||
|
autoload -U +X bashcompinit && bashcompinit
|
||||||
fi
|
fi
|
||||||
|
|
||||||
complete -o default -F __nvm nvm
|
complete -o default -F __nvm nvm
|
||||||
|
|
Loading…
Reference in New Issue