Skip to content
Open
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions contrib/completion/bash/sdk
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ __sdkman_complete_command() {
done
;;
install|i|list|ls)
candidates=${SDKMAN_CANDIDATES[@]}
candidates=("${SDKMAN_CANDIDATES[@]}")
;;
env|e)
candidates=("init" "install" "clear")
Expand All @@ -49,7 +49,7 @@ __sdkman_complete_command() {
;;
esac

COMPREPLY=($(compgen -W "${candidates[*]}" -- "$current_word"))
mapfile -t COMPREPLY < <(compgen -W "${candidates[*]}" -- "$current_word")
}

__sdkman_complete_candidate_version() {
Expand All @@ -76,7 +76,7 @@ __sdkman_complete_candidate_version() {
;;
esac

COMPREPLY=($(compgen -W "${candidates[*]}" -- "$candidate_version"))
mapfile -t COMPREPLY < <(compgen -W "${candidates[*]}" -- "$candidate_version")
}

complete -o default -F _sdk sdk
Expand Down