-
Notifications
You must be signed in to change notification settings - Fork 6
/
Copy path_gvm
56 lines (48 loc) · 1.57 KB
/
_gvm
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
#compdef gvm
#autoload
# gvm zsh completion, based on homebrew completion
local -a _1st_arguments
_1st_arguments=(
'install:install a candidate version'
'uninstall:uninstall a candidate version'
'list:list available candidate versions'
'use:use a candidate version in current shell'
'current:display current candidate version'
'version:display the current version of gvm'
'default:set the default candidate version for every shell'
'selfupdate:update the gvm'
'broadcast:display the last broadcast message'
'help:show the gvm help message'
'offline:enable or disable offline mode'
)
local -a _2nd_arguments
_2nd_arguments=(
'groovy:dynamic jvm programming language'
'grails:full-stack web framework'
'griffon:framework for building desktop application'
'gradle:build tool using groovy dsl'
'lazybones:project creation tool that uses packaged project templates'
'vertx:event driven application framework'
'groovyserv:run groovy as a server, reduces start-up time'
'springboot:create a spring application with minimum setup'
)
local -a _toggle_mode
_toggle_mode=(
'enable:enable offline mode'
'disable:disable offline mode'
)
local expl
_arguments \
'*:: :->subcmds' && return 0
if (( CURRENT == 1 )); then
_describe -t commands "gvm subcommand" _1st_arguments
return
fi
case "$words[1]" in
install|uninstall|list|use|current|default)
_describe -t commands "gvm subcommand" _2nd_arguments ;;
i|rm|ls|u|c|d)
_describe -t commands "gvm subcommand" _2nd_arguments ;;
offline)
_describe -t commands "gvm subcommand" _toggle_mode ;;
esac