Skip to content

Commit

Permalink
Prevent Re-initialization of zsh completion system
Browse files Browse the repository at this point in the history
  * Resolves issue with gcloud sdk completions not working
andrewrembrandt authored and marc0der committed Aug 11, 2021
1 parent 4b4822d commit 597cda1
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions src/main/bash/sdkman-init.sh
Original file line number Diff line number Diff line change
@@ -178,8 +178,11 @@ export PATH
# source completion scripts
if [[ "$sdkman_auto_complete" == 'true' ]]; then
if [[ "$zsh_shell" == 'true' ]]; then
autoload -Uz compinit
compinit
# initialize zsh completions (if not already done)
if ! (( $+functions[compdef] )) ; then
autoload -Uz compinit
compinit
fi
source "${SDKMAN_DIR}/contrib/completion/zsh/sdk"
__sdkman_echo_debug "ZSH completion script loaded..."
elif [[ "$bash_shell" == 'true' ]]; then

0 comments on commit 597cda1

Please sign in to comment.