aboutsummaryrefslogtreecommitdiffhomepage
path: root/site/docs/install.md
diff options
context:
space:
mode:
authorGravatar Cody Schroeder <schroederc@google.com>2015-06-09 16:34:51 +0000
committerGravatar Philipp Wollermann <philwo@google.com>2015-06-10 16:02:21 +0000
commit6b2766dd0e97e37fd56c1c538bc029f22e68dfcd (patch)
tree6aad49a8bb548254db27b95a8c83fa73c111c6b7 /site/docs/install.md
parenta01b9fe41836a90492a492b127d8236cfe062669 (diff)
Add zsh completion script
Fixes #163 -- MOS_MIGRATED_REVID=95542929
Diffstat (limited to 'site/docs/install.md')
-rw-r--r--site/docs/install.md23
1 files changed, 22 insertions, 1 deletions
diff --git a/site/docs/install.md b/site/docs/install.md
index f4aefd4bd5..38f2447910 100644
--- a/site/docs/install.md
+++ b/site/docs/install.md
@@ -134,7 +134,7 @@ $ export PATH="$PATH:$HOME/bazel/output"
You can also add this command to your `~/.bashrc` file.
-## Getting bash completion
+### Getting bash completion
Bazel comes with a bash completion script. To install it:
@@ -145,4 +145,25 @@ Bazel comes with a bash completion script. To install it:
you and simply insert `source /path/to/bazel-complete.bash` in your
`~/.bashrc` file (under OS X, put it in your `~/.bash_profile` file).
+### Getting zsh completion
+
+Bazel also comes with a zsh completion script. To install it:
+
+1. Add this script to a directory on your $fpath:
+
+ ```
+ fpath[1,0]=~/.zsh/completion/
+ mkdir -p ~/.zsh/completion/
+ cp scripts/zsh_completion/_bazel ~/.zsh/completion
+ ```
+
+2. Optionally, add the following to your .zshrc.
+
+ ```
+ # This way the completion script does not have to parse Bazel's options
+ # repeatedly. The directory in cache-path must be created manually.
+ zstyle ':completion:*' use-cache on
+ zstyle ':completion:*' cache-path ~/.zsh/cache
+ ```
+
For more information, see [Getting started](getting-started.html).