3 ### SDKMAN Autocomplete for Oh My Zsh
8 compadd -X $'Commands:\n' -- "${${(Mk)functions[@]:#__sdk_*}[@]#__sdk_}"
14 compadd -X $'Candidates:\n' -- "${SDKMAN_CANDIDATES[@]}"
16 ug|upgrade|h|home|c|current|u|use|d|default|rm|uninstall)
17 compadd -X $'Installed Candidates:\n' -- "${${(u)${(f)$(find -L -- "${SDKMAN_CANDIDATES_DIR}" -mindepth 2 -maxdepth 2 -type d)}[@]:h}[@]:t}"
23 compadd enable disable
29 compadd archives broadcast temp version
36 setopt localoptions kshglob
37 if [[ "${words[3]}" == 'java' ]]; then
38 compadd -X $'Installable Versions of java:\n' -- "${${${${${(f)$(__sdkman_list_versions "${words[3]}")}[@]:5:-4}[@]:#* | (local only|installed ) | *}[@]##* | | }[@]%%+( )}"
40 compadd -X "Installable Versions of ${words[3]}:"$'\n' -- "${${(z)${(M)${(f)${$(__sdkman_list_versions "${words[3]}")//[*+>]+( )/-}}[@]:# *}[@]}[@]:#-*}"
43 h|home|u|use|d|default|rm|uninstall)
44 compadd -X "Installed Versions of ${words[3]}:"$'\n' -- "${${(f)$(find -L -- "${SDKMAN_CANDIDATES_DIR}/${words[3]}" -mindepth 1 -maxdepth 1 -type d -not -name 'current')}[@]:t}"
51 _files -X "Path to Local Installation of ${words[3]} ${words[4]}:"$'\n' -/