Added snippet into _archlinux-java and reformated

This commit is contained in:
Jindrich Pilar 2016-10-08 17:35:57 +02:00
parent 3c98c2d308
commit 6db432153e
1 changed files with 21 additions and 14 deletions

View File

@ -41,10 +41,10 @@
_archlinux-java_command_arguments() {
case $words[1] in
(set)
local java_versions=("${(@f)$(archlinux-java status | tail -n +2 | tr -s ' ' | cut -d ' ' -f2)}")
_describe -t output 'Downloads to delete' java_versions
;;
(set)
local java_versions=("${(@f)$(archlinux-java status | tail -n +2 | tr -s ' ' | cut -d ' ' -f2)}")
_describe -t output 'Downloads to delete' java_versions
;;
esac
}
@ -62,18 +62,25 @@ commands=(
)
_arguments -C \
'1:cmd:->cmds' \
'*:: :->args' \
'1:cmd:->cmds' \
'*:: :->args' \
case "$state" in
(cmds)
_describe -t commands 'commands' commands
;;
(*)
_archlinux-java_command_arguments
;;
esac
case "$state" in
(cmds)
_describe -t commands 'commands' commands
;;
(*)
_archlinux-java_command_arguments
;;
esac
}
_archlinux-java
# Local Variables:
# mode: Shell-Script
# sh-indentation: 2
# indent-tabs-mode: nil
# sh-basic-offset: 2
# End:
# vim: ft=zsh sw=2 ts=2 et