Diff
1diff --git a/plugins/golang/golang.plugin.zsh b/plugins/golang/golang.plugin.zsh
2index e60c4afe48e0b44cac537422229f8f32943a0349..18bcaaff284dc0e9dff48627826e09f461744682 100644
3--- a/plugins/golang/golang.plugin.zsh
4+++ b/plugins/golang/golang.plugin.zsh
5@@ -1,9 +1,10 @@
6-# From : http://golang.org/misc/zsh/go?m=text
7+# install in /etc/zsh/zshrc or your personal .zshrc
8+
9 # gc
10 prefixes=(5 6 8)
11 for p in $prefixes; do
12- compctl -g "*.${p}" ${p}l
13- compctl -g "*.go" ${p}g
14+ compctl -g "*.${p}" ${p}l
15+ compctl -g "*.go" ${p}g
16 done
17
18 # standard go tools
19@@ -19,6 +20,7 @@ __go_tool_complete() {
20 'build[compile packages and dependencies]'
21 'clean[remove object files]'
22 'doc[run godoc on package sources]'
23+ 'env[print Go environment information]'
24 'fix[run go tool fix on packages]'
25 'fmt[run gofmt on package sources]'
26 'get[download and install packages and dependencies]'
27@@ -39,12 +41,17 @@ __go_tool_complete() {
28 build_flags=(
29 '-a[force reinstallation of packages that are already up-to-date]'
30 '-n[print the commands but do not run them]'
31- "-p[number of parallel builds]:number"
32+ '-p[number of parallel builds]:number'
33+ '-race[enable data race detection]'
34 '-x[print the commands]'
35- "-work[print temporary directory name and keep it]"
36- "-gcflags[flags for 5g/6g/8g]:flags"
37- "-ldflags[flags for 5l/6l/8l]:flags"
38- "-gccgoflags[flags for gccgo]:flags"
39+ '-work[print temporary directory name and keep it]'
40+ '-ccflags[flags for 5c/6c/8c]:flags'
41+ '-gcflags[flags for 5g/6g/8g]:flags'
42+ '-ldflags[flags for 5l/6l/8l]:flags'
43+ '-gccgoflags[flags for gccgo]:flags'
44+ '-compiler[name of compiler to use]:name'
45+ '-installsuffix[suffix to add to package directory]:suffix'
46+ '-tags[list of build tags to consider satisfied]:tags'
47 )
48 __go_list() {
49 local expl importpaths
50@@ -62,7 +69,7 @@ __go_tool_complete() {
51 install)
52 _arguments -s -w : ${build_flags[@]} \
53 "-v[show package names]" \
54- '*:importpaths:__go_list'
55+ '*:importpaths:__go_list'
56 ;;
57 get)
58 _arguments -s -w : \
59@@ -87,7 +94,10 @@ __go_tool_complete() {
60 "-cpu[values of GOMAXPROCS to use]:number list" \
61 "-run[run tests and examples matching regexp]:regexp" \
62 "-bench[run benchmarks matching regexp]:regexp" \
63- "-benchtime[run each benchmark during n seconds]:duration" \
64+ "-benchmem[print memory allocation stats]" \
65+ "-benchtime[run each benchmark until taking this long]:duration" \
66+ "-blockprofile[write goroutine blocking profile to file]:file" \
67+ "-blockprofilerate[set sampling rate of goroutine blocking profile]:number" \
68 "-timeout[kill test after that duration]:duration" \
69 "-cpuprofile[write CPU profile to file]:file:_files" \
70 "-memprofile[write heap profile to file]:file:_files" \
71@@ -97,7 +107,7 @@ __go_tool_complete() {
72 help)
73 _values "${commands[@]}" \
74 'gopath[GOPATH environment variable]' \
75- 'importpath[description of import paths]' \
76+ 'packages[description of package lists]' \
77 'remote[remote import path syntax]' \
78 'testflag[description of testing flags]' \
79 'testfunc[description of testing functions]'
80@@ -147,4 +157,4 @@ __go_tool_complete() {
81 esac
82 }
83
84-compdef __go_tool_complete go
85+compdef __go_tool_complete go