a29f8f76599e93653f006c2e074bd1dc47cc9b4b

Author
Marc Cornellà <marc.cornella@live.com>
Committer
Marc Cornellà <marc.cornella@live.com>
Date

Message

Fix formatting of gb plugin completion

Diff

This diff is truncated to protect this page.

  1diff --git a/plugins/getgb/getgb.plugin.zsh b/plugins/getgb/getgb.plugin.zsh
  2index 9efb00c9898bb4893033dd8b171bae831559f229..726f0a24fed6993574189dfad82cb6717f4ff2e1 100644
  3--- a/plugins/getgb/getgb.plugin.zsh
  4+++ b/plugins/getgb/getgb.plugin.zsh
  5@@ -1,114 +1,108 @@
  6-function _gb_commands() {
  7-    local ret=1 state
  8-    _arguments -C ':command:->command' '*::options:->options' && ret=0
  9+_gb () {
 10+	local ret=1 state
 11+	_arguments -C ':command:->command' '*::options:->options' && ret=0
 12 
 13-    case $state in
 14-      (command)
 15-
 16-        local -a subcommands
 17-        subcommands=(
 18-          "build:build a package"
 19-          "doc:show documentation for a package or symbol"
 20-          "env:print project environment variables"
 21-          "generate:generate Go files by processing source"
 22-          "help:displays the help"
 23-          "info:info returns information about this project"
 24-          "list:list the packages named by the importpaths"
 25-          "test:test packages"
 26-          "vendor:manage your vendored dependencies"
 27-        )
 28-        _describe -t subcommands 'gb subcommands' subcommands && ret=0
 29-      ;;
 30-
 31-      (options)
 32-        case $line[1] in
 33-          (build)
 34-            _arguments \
 35-              -f'[ignore cached packages]' \
 36-              -F'[do not cache packages]' \
 37-              -q'[decreases verbosity]' \
 38-              -P'[the number of build jobs to run in parallel]' \
 39-              -R'[sets the base of the project root search path]' \
 40-              -dotfile'[output a dot formatted file of the build steps]' \
 41-              -ldflags'["flag list" arguments to pass to the linker]' \
 42-              -gcflags'["arg list" arguments to pass to the compiler]' \
 43-              -race'[enable data race detection]' \
 44-              -tags'["tag list" additional build tags]'
 45-            ;;
 46-          (list)
 47-            _arguments \
 48-              -f'[alternate format for the list, using the syntax of package template]' \
 49-              -s'[read format template from STDIN]' \
 50-              -json'[prints output in structured JSON format]'
 51-            ;;
 52-          (test)
 53-            _arguments \
 54-              -v'[print output from test subprocess]' \
 55-              -ldflags'["flag list" arguments to pass to the linker]' \
 56-              -gcflags'["arg list" arguments to pass to the compiler]' \
 57-              -race'[enable data race detection]' \
 58-              -tags'["tag list" additional build tags]'
 59-            ;;
 60-          (vendor)
 61-            __gb-vendor
 62-        esac
 63-      ;;
 64-    esac
 65+	case $state in
 66+	(command)
 67+		local -a subcommands
 68+		subcommands=(
 69+			"build:build a package"
 70+			"doc:show documentation for a package or symbol"
 71+			"env:print project environment variables"
 72+			"generate:generate Go files by processing source"
 73+			"help:displays the help"
 74+			"info:info returns information about this project"
 75+			"list:list the packages named by the importpaths"
 76+			"test:test packages"
 77+			"vendor:manage your vendored dependencies"
 78+		)
 79+		_describe -t subcommands 'gb subcommands' subcommands && ret=0
 80+		;;
 81+	(options)
 82+		case $line[1] in
 83+		(build)
 84+			_arguments \
 85+				-f'[ignore cached packages]' \
 86+				-F'[do not cache packages]' \
 87+				-q'[decreases verbosity]' \
 88+				-P'[the number of build jobs to run in parallel]' \
 89+				-R'[sets the base of the project root search path]' \
 90+				-dotfile'[output a dot formatted file of the build steps]' \
 91+				-ldflags'["flag list" arguments to pass to the linker]' \
 92+				-gcflags'["arg list" arguments to pass to the compiler]' \
 93+				-race'[enable data race detection]' \
 94+				-tags'["tag list" additional build tags]'
 95+			;;
 96+		(list)
 97+			_arguments \
 98+				-f'[alternate format for the list, using the syntax of package template]' \
 99+				-s'[read format template from STDIN]' \
100+				-json'[prints output in structured JSON format]'
101+			;;
102+		(test)
103+			_arguments \
104+				-v'[print output from test subprocess]' \