mirror of
https://github.com/ohmyzsh/ohmyzsh.git
synced 2024-11-14 09:50:08 +00:00
Fix formatting of gb plugin completion
This commit is contained in:
parent
d0ea3f22b1
commit
a29f8f7659
1 changed files with 101 additions and 107 deletions
|
@ -1,10 +1,9 @@
|
||||||
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() {
|
||||||
)
|
)
|
||||||
_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() {
|
||||||
-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() {
|
||||||
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 ()
|
||||||
)
|
)
|
||||||
_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)
|
||||||
|
|
Loading…
Reference in a new issue