attempt to patch list
This commit is contained in:
parent
65c9fd6e88
commit
49044a25a8
31
src/_golang
31
src/_golang
|
@ -43,8 +43,6 @@
|
||||||
#
|
#
|
||||||
# ------------------------------------------------------------------------------
|
# ------------------------------------------------------------------------------
|
||||||
|
|
||||||
typeset -A opt_args
|
|
||||||
|
|
||||||
__go_buildmodes() {
|
__go_buildmodes() {
|
||||||
local -a buildmodes
|
local -a buildmodes
|
||||||
buildmodes=(
|
buildmodes=(
|
||||||
|
@ -103,7 +101,7 @@ case $state in
|
||||||
'-buildmode[build mode to use]:mode:__go_buildmodes'
|
'-buildmode[build mode to use]:mode:__go_buildmodes'
|
||||||
'-compiler[name of compiler to use]:name'
|
'-compiler[name of compiler to use]:name'
|
||||||
'-gccgoflags[arguments for gccgo]:args'
|
'-gccgoflags[arguments for gccgo]:args'
|
||||||
'-gcflags[arguments for each go tool compile invocation]:args'
|
'-gcflags=[arguments for each go tool compile invocation]:args'
|
||||||
'-installsuffix[suffix to add to package directory]:suffix'
|
'-installsuffix[suffix to add to package directory]:suffix'
|
||||||
'-ldflags[arguments to pass on each go tool link invocation.]:flags'
|
'-ldflags[arguments to pass on each go tool link invocation.]:flags'
|
||||||
'-linkshared[link against shared libraries]'
|
'-linkshared[link against shared libraries]'
|
||||||
|
@ -260,15 +258,26 @@ case $state in
|
||||||
;;
|
;;
|
||||||
|
|
||||||
list)
|
list)
|
||||||
_arguments \
|
# TODO: if statement does not work atm
|
||||||
'-e[changes the handling of erroneous packages]' \
|
local -a list_args
|
||||||
'-f[specifies an alternate format for the list]:format' \
|
list_args=(
|
||||||
'-json[causes package data to be printed in JSON format]' \
|
'-e[changes the handling of erroneous packages]'
|
||||||
'-compiled[set CompiledGoFiles to the Go source files presented to the compiler]' \
|
'-f[specifies an alternate format for the list]:format'
|
||||||
'-deps[iterate over named packages and their dependencies]' \
|
'-json[causes package data to be printed in JSON format]'
|
||||||
'-m[list modules instead of packages]' \
|
'-compiled[set CompiledGoFiles to the Go source files presented to the compiler]'
|
||||||
${build_flags[@]} \
|
'-deps[iterate over named packages and their dependencies]'
|
||||||
|
'-m[list modules instead of packages]'
|
||||||
|
${build_flags[@]}
|
||||||
|
${mod_flags[@]}
|
||||||
'*:importpaths:__go_packages'
|
'*:importpaths:__go_packages'
|
||||||
|
)
|
||||||
|
if [[ -n ${opt_args[(I)-m]} ]]; then
|
||||||
|
list_args+=(
|
||||||
|
'-u[adds information about available upgrades]'
|
||||||
|
'-versions[list all known versions of modules]'
|
||||||
|
)
|
||||||
|
fi
|
||||||
|
_arguments ${list_args[@]}
|
||||||
;;
|
;;
|
||||||
|
|
||||||
mod)
|
mod)
|
||||||
|
|
Loading…
Reference in New Issue