Commit a29f8f76 authored by Marc Cornellà's avatar Marc Cornellà
Browse files

Fix formatting of gb plugin completion

parent d0ea3f22
function _gb_commands() { _gb () {
local ret=1 state local ret=1 state
_arguments -C ':command:->command' '*::options:->options' && ret=0 _arguments -C ':command:->command' '*::options:->options' && ret=0
case $state in case $state in
(command) (command)
local -a subcommands local -a subcommands
subcommands=( subcommands=(
"build:build a package" "build:build a package"
...@@ -19,7 +18,6 @@ function _gb_commands() { ...@@ -19,7 +18,6 @@ function _gb_commands() {
) )
_describe -t subcommands 'gb subcommands' subcommands && ret=0 _describe -t subcommands 'gb subcommands' subcommands && ret=0
;; ;;
(options) (options)
case $line[1] in case $line[1] in
(build) (build)
...@@ -50,7 +48,7 @@ function _gb_commands() { ...@@ -50,7 +48,7 @@ function _gb_commands() {
-tags'["tag list" additional build tags]' -tags'["tag list" additional build tags]'
;; ;;
(vendor) (vendor)
__gb-vendor _gb-vendor
esac esac
;; ;;
esac esac
...@@ -58,17 +56,14 @@ function _gb_commands() { ...@@ -58,17 +56,14 @@ function _gb_commands() {
return ret return ret
} }
compdef _gb_commands gb compdef _gb gb
__gb-vendor () _gb-vendor () {
{
local curcontext="$curcontext" state line local curcontext="$curcontext" state line
_arguments -C ':command:->command' '*::options:->options' _arguments -C ':command:->command' '*::options:->options'
case $state in case $state in
(command) (command)
local -a subcommands local -a subcommands
subcommands=( subcommands=(
'delete:deletes a local dependency' 'delete:deletes a local dependency'
...@@ -80,7 +75,6 @@ __gb-vendor () ...@@ -80,7 +75,6 @@ __gb-vendor ()
) )
_describe -t subcommands 'gb vendor subcommands' subcommands && ret=0 _describe -t subcommands 'gb vendor subcommands' subcommands && ret=0
;; ;;
(options) (options)
case $line[1] in case $line[1] in
(delete) (delete)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment