aboutsummaryrefslogtreecommitdiffstats
path: root/src/_golang
diff options
context:
space:
mode:
authorShohei YOSHIDA <syohex@gmail.com>2024-07-29 14:28:17 +0900
committerShohei YOSHIDA <syohex@gmail.com>2024-07-29 14:28:17 +0900
commit4b55f149e657db8de3b055be575639fbc151cf75 (patch)
treeb9a54e9dca1356f4b82dda9319d9b09b9139ca78 /src/_golang
parentMerge pull request #1092 from zsh-users/refactor_go (diff)
downloadzsh-completions-4b55f149e657db8de3b055be575639fbc151cf75.tar
zsh-completions-4b55f149e657db8de3b055be575639fbc151cf75.tar.gz
zsh-completions-4b55f149e657db8de3b055be575639fbc151cf75.tar.bz2
zsh-completions-4b55f149e657db8de3b055be575639fbc151cf75.tar.lz
zsh-completions-4b55f149e657db8de3b055be575639fbc151cf75.tar.xz
zsh-completions-4b55f149e657db8de3b055be575639fbc151cf75.tar.zst
zsh-completions-4b55f149e657db8de3b055be575639fbc151cf75.zip
Update help and work subcommand completions
Diffstat (limited to 'src/_golang')
-rw-r--r--src/_golang26
1 files changed, 15 insertions, 11 deletions
diff --git a/src/_golang b/src/_golang
index 47819c9..ec88f91 100644
--- a/src/_golang
+++ b/src/_golang
@@ -377,6 +377,7 @@ case $state in
'-go[sets the expected Go language version]:goversion'
'*-replace=[add a replacement of the given module path and version]:replace'
'*-dropreplace=[drop a replacement of the given module path and version]:dropreplace'
+ '-toolchain=[set the Go toolchain to use]:name'
'-json[prints the final go.mod/work file in JSON format]'
'-print[prints the final go.mod/work in its text format]'
)
@@ -1051,12 +1052,13 @@ case $state in
'*:importpaths:__go_packages'
;;
- work)
+ (work)
local -a work_commands=(
'edit:edit go.work from tools or scripts'
'init:initialize workspace file'
'sync:sync workspace build list to modules'
'use:add modules to workspace file'
+ 'vendor:make vendored copy of dependencies'
)
_arguments \
@@ -1064,9 +1066,9 @@ case $state in
'*:: :->args'
case $state in
- args)
+ (args)
case $words[1] in
- edit)
+ (edit)
_arguments \
${edit_flags[@]} \
'*-use[add use directive from the go.work set of module directories]' \
@@ -1074,25 +1076,29 @@ case $state in
':go.work:_path_files -g "go.work"'
;;
- init)
+ (init)
_arguments \
'*:directory: _path_files -/'
;;
- sync)
- ;;
-
- use)
+ (use)
_arguments \
'-r[searches recursively for modules in the argumentdirectories]' \
'*:directory: _path_files -/'
;;
+
+ (vendor)
+ _arguments \
+ '-v[print the names of vendored modules and packages to standard error]' \
+ '-e[attempt to proceed despite errors encountered while loading packages]' \
+ '-o[create the vendor directory at the given path instead of vendor]:outdir:_path_files -/'
+ ;;
esac
;;
esac
;;
- help)
+ (help)
local -a topics=(
'buildconstraint:build constraints'
'buildmode:build modes'
@@ -1102,11 +1108,9 @@ case $state in
'filetype:file types'
'go.mod:the go.mod file'
'gopath:GOPATH environment variable'
- 'gopath-get:legacy GOPATH go get'
'goproxy:module proxy protocol'
'importpath:import path syntax'
'modules:modules, module versions, and more'
- 'module-get:module-aware go get'
'module-auth:module authentication using go.sum'
'packages:package lists and patterns'
'private:configuration for downloading non-public code'