Fix formatting of gb plugin completion
This commit is contained in:
parent
d0ea3f22b1
commit
a29f8f7659
@ -1,10 +1,9 @@
|
||||
function _gb_commands() {
|
||||
_gb () {
|
||||
local ret=1 state
|
||||
_arguments -C ':command:->command' '*::options:->options' && ret=0
|
||||
|
||||
case $state in
|
||||
(command)
|
||||
|
||||
local -a subcommands
|
||||
subcommands=(
|
||||
"build:build a package"
|
||||
@ -19,7 +18,6 @@ function _gb_commands() {
|
||||
)
|
||||
_describe -t subcommands 'gb subcommands' subcommands && ret=0
|
||||
;;
|
||||
|
||||
(options)
|
||||
case $line[1] in
|
||||
(build)
|
||||
@ -50,7 +48,7 @@ function _gb_commands() {
|
||||
-tags'["tag list" additional build tags]'
|
||||
;;
|
||||
(vendor)
|
||||
__gb-vendor
|
||||
_gb-vendor
|
||||
esac
|
||||
;;
|
||||
esac
|
||||
@ -58,17 +56,14 @@ function _gb_commands() {
|
||||
return ret
|
||||
}
|
||||
|
||||
compdef _gb_commands gb
|
||||
compdef _gb gb
|
||||
|
||||
__gb-vendor ()
|
||||
{
|
||||
_gb-vendor () {
|
||||
local curcontext="$curcontext" state line
|
||||
|
||||
_arguments -C ':command:->command' '*::options:->options'
|
||||
|
||||
case $state in
|
||||
(command)
|
||||
|
||||
local -a subcommands
|
||||
subcommands=(
|
||||
'delete:deletes a local dependency'
|
||||
@ -80,7 +75,6 @@ __gb-vendor ()
|
||||
)
|
||||
_describe -t subcommands 'gb vendor subcommands' subcommands && ret=0
|
||||
;;
|
||||
|
||||
(options)
|
||||
case $line[1] in
|
||||
(delete)
|
||||
|
Loading…
Reference in New Issue
Block a user