This commit is contained in:
Yinka Erinle 2016-05-12 04:04:06 +00:00
commit 57efc90b8d
4 changed files with 99 additions and 0 deletions

43
plugins/gvm/_gvm Normal file
View file

@ -0,0 +1,43 @@
#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'
)
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'
)
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 ;;
esac