mirror of
https://github.com/zsh-users/zsh-completions.git
synced 2026-09-17 16:00:19 +00:00
fix logic about go list -m
This commit is contained in:
+3
-3
@@ -101,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:_gcflags'
|
||||||
'-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]'
|
||||||
@@ -258,7 +258,6 @@ case $state in
|
|||||||
;;
|
;;
|
||||||
|
|
||||||
list)
|
list)
|
||||||
# TODO: if statement does not work atm
|
|
||||||
local -a list_args
|
local -a list_args
|
||||||
list_args=(
|
list_args=(
|
||||||
'-e[changes the handling of erroneous packages]'
|
'-e[changes the handling of erroneous packages]'
|
||||||
@@ -271,7 +270,8 @@ case $state in
|
|||||||
${mod_flags[@]}
|
${mod_flags[@]}
|
||||||
'*:importpaths:__go_packages'
|
'*:importpaths:__go_packages'
|
||||||
)
|
)
|
||||||
if [[ -n ${opt_args[(I)-m]} ]]; then
|
# -u and -versions are only available if -m is present on the commandline
|
||||||
|
if (($words[(I)-m])); then
|
||||||
list_args+=(
|
list_args+=(
|
||||||
'-u[adds information about available upgrades]'
|
'-u[adds information about available upgrades]'
|
||||||
'-versions[list all known versions of modules]'
|
'-versions[list all known versions of modules]'
|
||||||
|
|||||||
Reference in New Issue
Block a user