Update help and work subcommand completions
This commit is contained in:
parent
f8c41dbdbb
commit
4b55f149e6
26
src/_golang
26
src/_golang
|
@ -377,6 +377,7 @@ case $state in
|
||||||
'-go[sets the expected Go language version]:goversion'
|
'-go[sets the expected Go language version]:goversion'
|
||||||
'*-replace=[add a replacement of the given module path and version]:replace'
|
'*-replace=[add a replacement of the given module path and version]:replace'
|
||||||
'*-dropreplace=[drop a replacement of the given module path and version]:dropreplace'
|
'*-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]'
|
'-json[prints the final go.mod/work file in JSON format]'
|
||||||
'-print[prints the final go.mod/work in its text format]'
|
'-print[prints the final go.mod/work in its text format]'
|
||||||
)
|
)
|
||||||
|
@ -1051,12 +1052,13 @@ case $state in
|
||||||
'*:importpaths:__go_packages'
|
'*:importpaths:__go_packages'
|
||||||
;;
|
;;
|
||||||
|
|
||||||
work)
|
(work)
|
||||||
local -a work_commands=(
|
local -a work_commands=(
|
||||||
'edit:edit go.work from tools or scripts'
|
'edit:edit go.work from tools or scripts'
|
||||||
'init:initialize workspace file'
|
'init:initialize workspace file'
|
||||||
'sync:sync workspace build list to modules'
|
'sync:sync workspace build list to modules'
|
||||||
'use:add modules to workspace file'
|
'use:add modules to workspace file'
|
||||||
|
'vendor:make vendored copy of dependencies'
|
||||||
)
|
)
|
||||||
|
|
||||||
_arguments \
|
_arguments \
|
||||||
|
@ -1064,9 +1066,9 @@ case $state in
|
||||||
'*:: :->args'
|
'*:: :->args'
|
||||||
|
|
||||||
case $state in
|
case $state in
|
||||||
args)
|
(args)
|
||||||
case $words[1] in
|
case $words[1] in
|
||||||
edit)
|
(edit)
|
||||||
_arguments \
|
_arguments \
|
||||||
${edit_flags[@]} \
|
${edit_flags[@]} \
|
||||||
'*-use[add use directive from the go.work set of module directories]' \
|
'*-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"'
|
':go.work:_path_files -g "go.work"'
|
||||||
;;
|
;;
|
||||||
|
|
||||||
init)
|
(init)
|
||||||
_arguments \
|
_arguments \
|
||||||
'*:directory: _path_files -/'
|
'*:directory: _path_files -/'
|
||||||
;;
|
;;
|
||||||
|
|
||||||
sync)
|
(use)
|
||||||
;;
|
|
||||||
|
|
||||||
use)
|
|
||||||
_arguments \
|
_arguments \
|
||||||
'-r[searches recursively for modules in the argumentdirectories]' \
|
'-r[searches recursively for modules in the argumentdirectories]' \
|
||||||
'*:directory: _path_files -/'
|
'*: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
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
;;
|
;;
|
||||||
|
|
||||||
help)
|
(help)
|
||||||
local -a topics=(
|
local -a topics=(
|
||||||
'buildconstraint:build constraints'
|
'buildconstraint:build constraints'
|
||||||
'buildmode:build modes'
|
'buildmode:build modes'
|
||||||
|
@ -1102,11 +1108,9 @@ case $state in
|
||||||
'filetype:file types'
|
'filetype:file types'
|
||||||
'go.mod:the go.mod file'
|
'go.mod:the go.mod file'
|
||||||
'gopath:GOPATH environment variable'
|
'gopath:GOPATH environment variable'
|
||||||
'gopath-get:legacy GOPATH go get'
|
|
||||||
'goproxy:module proxy protocol'
|
'goproxy:module proxy protocol'
|
||||||
'importpath:import path syntax'
|
'importpath:import path syntax'
|
||||||
'modules:modules, module versions, and more'
|
'modules:modules, module versions, and more'
|
||||||
'module-get:module-aware go get'
|
|
||||||
'module-auth:module authentication using go.sum'
|
'module-auth:module authentication using go.sum'
|
||||||
'packages:package lists and patterns'
|
'packages:package lists and patterns'
|
||||||
'private:configuration for downloading non-public code'
|
'private:configuration for downloading non-public code'
|
||||||
|
|
Loading…
Reference in New Issue