File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 4848#
4949# * To disable listing packages from GOROOT (i.e. Go stdlib) in completions use:
5050#
51- # zstyle ':completion:*:go:*' no- goroot true
51+ # zstyle ':completion:*:go-packages- goroot' command ""
5252#
5353# * To disable listing packages from GOPATH in completions use:
5454#
55- # zstyle ':completion:*:go:*' no- gopath true
55+ # zstyle ':completion:*:go-packages- gopath' command ""
5656#
5757# ------------------------------------------------------------------------------
5858
@@ -370,12 +370,9 @@ case $state in
370370 __go_packages () {
371371 local gopaths
372372 declare -a gopaths
373- if ! zstyle -t " :completion:${curcontext} :" no-gopath; then
374- gopaths=(" ${(s/:/ )$(go env GOPATH)} " )
375- fi
376- if ! zstyle -t " :completion:${curcontext} :" no-goroot; then
377- gopaths+=(" $( go env GOROOT) " )
378- fi
373+ gopaths=()
374+ gopaths+=(" ${(s/:/ )$(_call_program go-packages-gopath go env GOPATH)} " )
375+ gopaths+=(" ${(s/:/ )$(_call_program go-packages-goroot go env GOROOT)} " )
379376 for p in $gopaths ; do
380377 _path_files $@ -W " $p /src" -/
381378 done
You can’t perform that action at this time.
0 commit comments