File tree Expand file tree Collapse file tree 1 file changed +28
-28
lines changed Expand file tree Collapse file tree 1 file changed +28
-28
lines changed Original file line number Diff line number Diff line change 1717#
1818
1919function __sdk_completion() {
20- cat << - 'EOF '
20+ \ c at << - 'EOF '
2121 _sdk_completion() {
22- local -r previous_word="${COMP_WORDS[COMP_CWORD - 1]}"
23- local -r current_word="${COMP_WORDS[COMP_CWORD]}"
22+ local -r previous_word="${COMP_WORDS[COMP_CWORD - 1]}"
23+ local -r current_word="${COMP_WORDS[COMP_CWORD]}"
2424
25- local candidates
25+ local candidates
2626
27- case "$previous_word" in
28- sdk)
29- candidates=("install" "uninstall" "list" "use" "default" "home" "env" "current" "upgrade" "version" "broadcast" "help" "offline" "selfupdate" "update" "flush")
30- ;;
31- env)
32- candidates=("init install clear")
33- ;;
34- current)
35- candidates=()
27+ case "$previous_word" in
28+ sdk)
29+ candidates=("install" "uninstall" "list" "use" "default" "home" "env" "current" "upgrade" "version" "broadcast" "help" "offline" "selfupdate" "update" "flush")
30+ ;;
31+ env)
32+ candidates=("init install clear")
33+ ;;
34+ current)
35+ candidates=()
3636
37- for candidate_path in "$SDKMAN_CANDIDATES_DIR"/*; do
38- candidates+=("${candidate_path##*/}")
39- done
40- ;;
41- offline)
42- candidates=("enable" "disable")
43- ;;
44- selfupdate)
45- candidates=("force")
46- ;;
47- flush)
48- candidates=("archives" "temp" "broadcast" "version")
49- ;;
50- esac
37+ for candidate_path in "$SDKMAN_CANDIDATES_DIR"/*; do
38+ candidates+=("${candidate_path##*/}")
39+ done
40+ ;;
41+ offline)
42+ candidates=("enable" "disable")
43+ ;;
44+ selfupdate)
45+ candidates=("force")
46+ ;;
47+ flush)
48+ candidates=("archives" "temp" "broadcast" "version")
49+ ;;
50+ esac
5151
52- COMPREPLY=($(compgen -W "${candidates[*]}" -- "$current_word"))
52+ COMPREPLY=($(compgen -W "${candidates[*]}" -- "$current_word"))
5353 }
5454
5555 complete -o default -F _sdk_completion sdk
You can’t perform that action at this time.
0 commit comments