File tree Expand file tree Collapse file tree 1 file changed +12
-2
lines changed Expand file tree Collapse file tree 1 file changed +12
-2
lines changed Original file line number Diff line number Diff line change @@ -29,6 +29,11 @@ __sdkman_complete_command() {
2929 candidates+=(${candidate_path##*/})
3030 done
3131 ;;
32+ install)
33+ while IFS= read -d, -r candidate; do
34+ candidates+=($candidate)
35+ done < <(curl --silent "${SDKMAN_CANDIDATES_API}/candidates/all")
36+ ;;
3237 completion)
3338 candidates=("bash" "zsh")
3439 ;;
@@ -52,7 +57,7 @@ __sdkman_complete_command() {
5257__sdkman_complete_candidate_version() {
5358 local -r command=$1
5459 local -r candidate=$2
55- local -r version =$3
60+ local -r candidate_version =$3
5661
5762 local candidates
5863
@@ -66,9 +71,14 @@ __sdkman_complete_candidate_version() {
6671 candidates+=(${version_path##*/})
6772 done
6873 ;;
74+ install)
75+ while IFS= read -d, -r version; do
76+ candidates+=($version)
77+ done < <(curl --silent "${SDKMAN_CANDIDATES_API}/candidates/$candidate/${SDKMAN_PLATFORM}/versions/all")
78+ ;;
6979 esac
7080
71- COMPREPLY=($(compgen -W "${candidates[*]}" -- "$current_word "))
81+ COMPREPLY=($(compgen -W "${candidates[*]}" -- "$candidate_version "))
7282}
7383
7484complete -o default -F _sdk sdk
You can’t perform that action at this time.
0 commit comments