rishabhg / grunt-zsh-completion

The zsh completion script for grunt.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

grunt-zsh-completion

grunt-zsh-completion is the zsh completion script for grunt/ grunt-cli

It quickly response because it uses the cache.

Screenshot1

Screenshot2

Installation

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"

Installation for oh-my-zsh

  1. In the command line, change to oh-my-zsh plugins directory:

    $ cd ~/.oh-my-zsh/custom/plugins
  2. Clone the repository into a new directory called grunt:

    git clone https://github.com/yonchu/grunt-zsh-completion.git grunt
  3. Include grunt plugin to your .zshrc file along with other plugins:

    ...
    plugins=(git grunt)
    ...
  4. Restart your terminal application.

Usage

Enable caching

If you want to use the cache, set the followings in your .zshrc:

zstyle ':completion:*' use-cache yes

Settings

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

About

The zsh completion script for grunt.