Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Don't auto-tap caskroom/cask in ZSH completion #3679

Merged
merged 1 commit into from
Jan 13, 2018
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 6 additions & 2 deletions completions/zsh/_brew_cask
Original file line number Diff line number Diff line change
Expand Up @@ -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
}

Expand Down