mirror of
https://github.com/ohmyzsh/ohmyzsh.git
synced 2024-12-28 07:50:09 +08:00
update golang plugin to match official version
This commit is contained in:
parent
2078e7d4de
commit
aa9db3e8f9
@ -1,4 +1,5 @@
|
|||||||
# From : http://golang.org/misc/zsh/go?m=text
|
# install in /etc/zsh/zshrc or your personal .zshrc
|
||||||
|
|
||||||
# gc
|
# gc
|
||||||
prefixes=(5 6 8)
|
prefixes=(5 6 8)
|
||||||
for p in $prefixes; do
|
for p in $prefixes; do
|
||||||
@ -19,6 +20,7 @@ __go_tool_complete() {
|
|||||||
'build[compile packages and dependencies]'
|
'build[compile packages and dependencies]'
|
||||||
'clean[remove object files]'
|
'clean[remove object files]'
|
||||||
'doc[run godoc on package sources]'
|
'doc[run godoc on package sources]'
|
||||||
|
'env[print Go environment information]'
|
||||||
'fix[run go tool fix on packages]'
|
'fix[run go tool fix on packages]'
|
||||||
'fmt[run gofmt on package sources]'
|
'fmt[run gofmt on package sources]'
|
||||||
'get[download and install packages and dependencies]'
|
'get[download and install packages and dependencies]'
|
||||||
@ -39,12 +41,17 @@ __go_tool_complete() {
|
|||||||
build_flags=(
|
build_flags=(
|
||||||
'-a[force reinstallation of packages that are already up-to-date]'
|
'-a[force reinstallation of packages that are already up-to-date]'
|
||||||
'-n[print the commands but do not run them]'
|
'-n[print the commands but do not run them]'
|
||||||
"-p[number of parallel builds]:number"
|
'-p[number of parallel builds]:number'
|
||||||
|
'-race[enable data race detection]'
|
||||||
'-x[print the commands]'
|
'-x[print the commands]'
|
||||||
"-work[print temporary directory name and keep it]"
|
'-work[print temporary directory name and keep it]'
|
||||||
"-gcflags[flags for 5g/6g/8g]:flags"
|
'-ccflags[flags for 5c/6c/8c]:flags'
|
||||||
"-ldflags[flags for 5l/6l/8l]:flags"
|
'-gcflags[flags for 5g/6g/8g]:flags'
|
||||||
"-gccgoflags[flags for gccgo]:flags"
|
'-ldflags[flags for 5l/6l/8l]:flags'
|
||||||
|
'-gccgoflags[flags for gccgo]:flags'
|
||||||
|
'-compiler[name of compiler to use]:name'
|
||||||
|
'-installsuffix[suffix to add to package directory]:suffix'
|
||||||
|
'-tags[list of build tags to consider satisfied]:tags'
|
||||||
)
|
)
|
||||||
__go_list() {
|
__go_list() {
|
||||||
local expl importpaths
|
local expl importpaths
|
||||||
@ -87,7 +94,10 @@ __go_tool_complete() {
|
|||||||
"-cpu[values of GOMAXPROCS to use]:number list" \
|
"-cpu[values of GOMAXPROCS to use]:number list" \
|
||||||
"-run[run tests and examples matching regexp]:regexp" \
|
"-run[run tests and examples matching regexp]:regexp" \
|
||||||
"-bench[run benchmarks matching regexp]:regexp" \
|
"-bench[run benchmarks matching regexp]:regexp" \
|
||||||
"-benchtime[run each benchmark during n seconds]:duration" \
|
"-benchmem[print memory allocation stats]" \
|
||||||
|
"-benchtime[run each benchmark until taking this long]:duration" \
|
||||||
|
"-blockprofile[write goroutine blocking profile to file]:file" \
|
||||||
|
"-blockprofilerate[set sampling rate of goroutine blocking profile]:number" \
|
||||||
"-timeout[kill test after that duration]:duration" \
|
"-timeout[kill test after that duration]:duration" \
|
||||||
"-cpuprofile[write CPU profile to file]:file:_files" \
|
"-cpuprofile[write CPU profile to file]:file:_files" \
|
||||||
"-memprofile[write heap profile to file]:file:_files" \
|
"-memprofile[write heap profile to file]:file:_files" \
|
||||||
@ -97,7 +107,7 @@ __go_tool_complete() {
|
|||||||
help)
|
help)
|
||||||
_values "${commands[@]}" \
|
_values "${commands[@]}" \
|
||||||
'gopath[GOPATH environment variable]' \
|
'gopath[GOPATH environment variable]' \
|
||||||
'importpath[description of import paths]' \
|
'packages[description of package lists]' \
|
||||||
'remote[remote import path syntax]' \
|
'remote[remote import path syntax]' \
|
||||||
'testflag[description of testing flags]' \
|
'testflag[description of testing flags]' \
|
||||||
'testfunc[description of testing functions]'
|
'testfunc[description of testing functions]'
|
||||||
|
Loading…
Reference in New Issue
Block a user