]> Cypherpunks repositories - gostls13.git/commitdiff
misc: add zsh completion (using compctl)
authorScott Lawrence <bytbox@gmail.com>
Tue, 31 Aug 2010 01:13:01 +0000 (21:13 -0400)
committerRuss Cox <rsc@golang.org>
Tue, 31 Aug 2010 01:13:01 +0000 (21:13 -0400)
R=golang-dev, rsc1, rsc
CC=golang-dev
https://golang.org/cl/2061042

misc/zsh/go [new file with mode: 0644]

diff --git a/misc/zsh/go b/misc/zsh/go
new file mode 100644 (file)
index 0000000..f17763d
--- /dev/null
@@ -0,0 +1,14 @@
+# install in /etc/zsh/zshrc or your personal .zshrc
+
+# gc
+prefixes=(5 6 8)
+for p in $prefixes; do
+       compctl -g "*.${p}" ${p}l
+       compctl -g "*.go" ${p}g
+done
+
+# standard go tools
+compctl -g "*.go" gofmt
+
+# gccgo
+compctl -g "*.go" gccgo