https://github.com/joshka/brew-cask-zsh-completions
Note: This repo is now deprecated given that these changes were merged into Homebrew at Homebrew/brew#936.
This script is a fork of the Zsh Homebrew Cask completion plugin from Oh My Zsh. It solves the following issues with the original code:
- Many users use Prezto rather than Oh My Zsh.
- The plugin worked by intercepting the brew command rather than the brew completion calling this completion script. These changes require Homebrew to merge brew#407 before it will work.
- It was missing a bunch of completions (mostly options).
Symlink or copy the completion script to a directory in your fpath. Homebrew
installs its completions into $(brew --prefix)/share/zsh/site-functions
which
is in the default fpath for the version of zsh installed by Homebrew.
$ git clone https://github.com/joshka/brew-cask-zsh-completions.git
$ ln -s brew-cask-zsh-completions/_brew_cask $(brew --prefix)/share/zsh/site-functions