mirror of
https://github.com/ohmyzsh/ohmyzsh.git
synced 2024-11-15 01:48:34 -07:00
sdk: support completion of new commands in 5.8.0 (#8870)
This commit is contained in:
parent
58a1a1397e
commit
06b0276675
@ -13,9 +13,12 @@ _sdk() {
|
|||||||
l|ls|list|i|install)
|
l|ls|list|i|install)
|
||||||
compadd -X $'Candidates:\n' -- "${SDKMAN_CANDIDATES[@]}"
|
compadd -X $'Candidates:\n' -- "${SDKMAN_CANDIDATES[@]}"
|
||||||
;;
|
;;
|
||||||
ug|upgrade|c|current|u|use|d|default|rm|uninstall)
|
ug|upgrade|h|home|c|current|u|use|d|default|rm|uninstall)
|
||||||
compadd -X $'Installed Candidates:\n' -- "${${(u)${(f)$(find -L -- "${SDKMAN_CANDIDATES_DIR}" -mindepth 2 -maxdepth 2 -type d)}[@]:h}[@]:t}"
|
compadd -X $'Installed Candidates:\n' -- "${${(u)${(f)$(find -L -- "${SDKMAN_CANDIDATES_DIR}" -mindepth 2 -maxdepth 2 -type d)}[@]:h}[@]:t}"
|
||||||
;;
|
;;
|
||||||
|
e|env)
|
||||||
|
compadd init
|
||||||
|
;;
|
||||||
offline)
|
offline)
|
||||||
compadd enable disable
|
compadd enable disable
|
||||||
;;
|
;;
|
||||||
@ -37,7 +40,7 @@ _sdk() {
|
|||||||
compadd -X "Installable Versions of ${words[3]}:"$'\n' -- "${${(z)${(M)${(f)${$(__sdkman_list_versions "${words[3]}")//[*+>]+( )/-}}[@]:# *}[@]}[@]:#-*}"
|
compadd -X "Installable Versions of ${words[3]}:"$'\n' -- "${${(z)${(M)${(f)${$(__sdkman_list_versions "${words[3]}")//[*+>]+( )/-}}[@]:# *}[@]}[@]:#-*}"
|
||||||
fi
|
fi
|
||||||
;;
|
;;
|
||||||
u|use|d|default|rm|uninstall)
|
h|home|u|use|d|default|rm|uninstall)
|
||||||
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}"
|
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}"
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
|
Loading…
Reference in New Issue
Block a user