File tree Expand file tree Collapse file tree 1 file changed +22
-1
lines changed Expand file tree Collapse file tree 1 file changed +22
-1
lines changed Original file line number Diff line number Diff line change @@ -134,7 +134,7 @@ $ export PATH="$PATH:$HOME/bazel/output"
134134
135135You can also add this command to your ` ~/.bashrc `  file.
136136
137- ## Getting bash completion  
137+ ###  Getting bash completion  
138138
139139Bazel comes with a bash completion script. To install it:
140140
@@ -145,4 +145,25 @@ Bazel comes with a bash completion script. To install it:
145145   you and simply insert ` source /path/to/bazel-complete.bash `  in your
146146   ` ~/.bashrc `  file (under OS X, put it in your ` ~/.bash_profile `  file).
147147
148+ ### Getting zsh completion  
149+ 
150+ Bazel also comes with a zsh completion script. To install it:
151+ 
152+ 1 .  Add this script to a directory on your $fpath:
153+ 
154+     ``` 
155+     fpath[1,0]=~/.zsh/completion/ 
156+     mkdir -p ~/.zsh/completion/ 
157+     cp scripts/zsh_completion/_bazel ~/.zsh/completion 
158+     ``` 
159+ 
160+ 2. Optionally, add the following to your .zshrc. 
161+ 
162+     ``` 
163+     # This way the completion script does not have to parse Bazel's options 
164+     # repeatedly.  The directory in cache-path must be created manually. 
165+     zstyle ':completion:*' use-cache on 
166+     zstyle ':completion:*' cache-path ~/.zsh/cache 
167+     ``` 
168+ 
148169For more information, see [Getting started](getting-started.html). 
    
 
   
 
     
   
   
          
     
  
    
     
 
    
      
     
 
     
    You can’t perform that action at this time.
  
 
    
  
     
    
      
        
     
 
       
      
     
   
 
    
    
  
 
  
 
     
    
0 commit comments