aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlyssa Ross2018-01-13 11:03:34 +0000
committerAlyssa Ross2018-01-13 11:03:34 +0000
commit2694fbd6a0dc3f44dfb689fc25f9899124436678 (patch)
treee47db3ad1b502e687d992f9d9d14747c25c56dee
parent651988bf5538c78d4a81428ea4153baf6c4b0318 (diff)
downloadbrew-2694fbd6a0dc3f44dfb689fc25f9899124436678.tar.bz2
Don't auto-tap caskroom/cask in ZSH completion
The Bash completion just uses the directory tree rather than invoking `brew cask`, so doesn't exhibit the same behaviour.
-rw-r--r--completions/zsh/_brew_cask8
1 files changed, 6 insertions, 2 deletions
diff --git a/completions/zsh/_brew_cask b/completions/zsh/_brew_cask
index ff277ea60..d702ea093 100644
--- a/completions/zsh/_brew_cask
+++ b/completions/zsh/_brew_cask
@@ -12,17 +12,21 @@
zstyle -T ':completion:*:*:*:brew-cask:*' tag-order && \
zstyle ':completion:*:*:*:brew-cask:*' tag-order 'commands'
+__brew_cask() {
+ [ -d "$(brew --repo caskroom/cask)" ] && brew cask $@
+}
+
__brew_all_casks() {
local -a list
local expl
- list=( $(brew cask search) )
+ list=( $(__brew_cask search) )
_wanted list expl 'all casks' compadd -a list
}
__brew_installed_casks() {
local -a list
local expl
- list=( $(brew cask list|sed 's/(!)//') )
+ list=( $(__brew_cask list|sed 's/(!)//') )
_wanted list expl 'installed casks' compadd -a list
}