aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlyssa Ross2018-01-13 13:53:43 +0000
committerGitHub2018-01-13 13:53:43 +0000
commit9a82eb6212ac504cff9eb4ea80e0bbecada21440 (patch)
tree9987bc2208ea4647783b8f114779d1ec2dd0b089
parent470922e064e11bd42c7897b04091cd5b18bb47a5 (diff)
parent2694fbd6a0dc3f44dfb689fc25f9899124436678 (diff)
downloadbrew-9a82eb6212ac504cff9eb4ea80e0bbecada21440.tar.bz2
Merge pull request #3679 from alyssais/zsh_cask_completion
Don't auto-tap caskroom/cask in ZSH completion
-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
}