summaryrefslogtreecommitdiff
path: root/misc
diff options
context:
space:
mode:
authorRui Ueyama <ruiu@google.com>2014-03-27 00:29:55 -0400
committerRui Ueyama <ruiu@google.com>2014-03-27 00:29:55 -0400
commit990560964ebe62281db10e7bfd085d0cbf6c8e8d (patch)
tree4b7187aa3f8c9267bcc2f515a6e5d06561b03b8c /misc
parentec10258e1b5eae044b4eadf6b82060f5fdd298a0 (diff)
downloadgo-990560964ebe62281db10e7bfd085d0cbf6c8e8d.tar.gz
misc/bash, misc/zsh: fix completion rules
This patch includes fixes pointed out in CL 52140043, which was originally written by john.gosset. LGTM=minux.ma R=golang-codereviews, minux.ma CC=golang-codereviews https://codereview.appspot.com/80320043 Committer: Shenghou Ma <minux.ma@gmail.com>
Diffstat (limited to 'misc')
-rw-r--r--misc/bash/go12
-rw-r--r--misc/zsh/go5
2 files changed, 4 insertions, 13 deletions
diff --git a/misc/bash/go b/misc/bash/go
index 90defda82..50f4f720b 100644
--- a/misc/bash/go
+++ b/misc/bash/go
@@ -22,8 +22,7 @@ _go()
local cmds="build clean env fix fmt get
install list run test tool version vet"
- local addhelp="gopath importpath remote
- testflag testfunc"
+ local addhelp="c gopath importpath packages testflag testfunc"
local other="help"
if [ "$COMP_CWORD" == 1 ]; then
@@ -185,15 +184,9 @@ _go()
'dist') # TODO: Implement something.
#_go_tool_dist
;;
- 'ebnflint') # TODO: Implement something.
- #_go_tool_ebnflint
- ;;
'fix') # TODO: Implement something.
#_go_tool_fix
;;
- 'gotype') # TODO: Implement something.
- #_go_tool_gotype
- ;;
'nm') # TODO: Implement something.
#_go_tool_nm
;;
@@ -203,9 +196,6 @@ _go()
'pprof') # TODO: Implement something.
#_go_tool_pprof
;;
- 'prof') # TODO: Implement something.
- #_go_tool_prof
- ;;
'vet') # TODO: Implement something.
#_go_tool_vet
;;
diff --git a/misc/zsh/go b/misc/zsh/go
index 18bcaaff2..066cf4065 100644
--- a/misc/zsh/go
+++ b/misc/zsh/go
@@ -19,7 +19,6 @@ __go_tool_complete() {
commands+=(
'build[compile packages and dependencies]'
'clean[remove object files]'
- 'doc[run godoc on package sources]'
'env[print Go environment information]'
'fix[run go tool fix on packages]'
'fmt[run gofmt on package sources]'
@@ -92,6 +91,7 @@ __go_tool_complete() {
"-short[use short mode]" \
"-parallel[number of parallel tests]:number" \
"-cpu[values of GOMAXPROCS to use]:number list" \
+ "-cover[enable coverage analysis]" \
"-run[run tests and examples matching regexp]:regexp" \
"-bench[run benchmarks matching regexp]:regexp" \
"-benchmem[print memory allocation stats]" \
@@ -106,9 +106,10 @@ __go_tool_complete() {
;;
help)
_values "${commands[@]}" \
+ 'c[how to call C code]' \
+ 'importpath[description of import path]' \
'gopath[GOPATH environment variable]' \
'packages[description of package lists]' \
- 'remote[remote import path syntax]' \
'testflag[description of testing flags]' \
'testfunc[description of testing functions]'
;;