grunt-zsh-completion
is the zsh completion script for
grunt/
grunt-cli
It quickly response because it uses the cache.
Put the _grunt
file to the fpath
directory.
$ cp _grunt /usr/local/share/zsh/site-functions/
$ exec zsh
Where the fpath
directory is ?
$ echo "$fpath" | tr " " "\n"
-
In the command line, change to
oh-my-zsh
plugins directory:$ cd ~/.oh-my-zsh/custom/plugins
-
Clone the repository into a new directory called
grunt
:git clone https://github.com/yonchu/grunt-zsh-completion.git grunt
-
Include
grunt
plugin to your .zshrc file along with other plugins:... plugins=(git grunt) ...
-
Restart your terminal application.
If you want to use the cache, set the followings in your .zshrc:
zstyle ':completion:*' use-cache yes
Show grunt file path:
zstyle ':completion::complete:grunt::options:' show_grunt_path yes
Cache expiration days (default: 7):
zstyle ':completion::complete:grunt::options:' expire 1
Note that if you change the zstyle settings, you should delete the cache file and restart zsh.
$ rm ~/.zcompcache/grunt
$ exec zsh