Merge pull request #8650 from Akylzhan/patch-1

Replace the usage of outdated brew cask list in zsh completion
This commit is contained in:
Mike McQuaid 2020-09-11 12:03:50 +01:00 committed by GitHub
commit 36f47393c7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -12,10 +12,6 @@
zstyle -T ':completion:*:*:*:brew-cask:*' tag-order && \
zstyle ':completion:*:*:*:brew-cask:*' tag-order 'commands'
__brew_cask() {
[ -d "$(brew --repo homebrew/cask)" ] && brew cask $@
}
__brew_all_casks() {
local -a list
local expl
@ -32,7 +28,7 @@ __brew_all_casks() {
__brew_installed_casks() {
local -a list
local expl
list=( $(__brew_cask list|sed 's/(!)//') )
list=( $(brew list --cask) )
_wanted list expl 'installed casks' compadd -a list
}
@ -91,10 +87,6 @@ _brew_cask_cat() {
__brew_all_casks
}
_brew_cask_cat() {
__brew_all_casks
}
_brew_cask_create() {
_arguments '*::token:'
}
@ -136,10 +128,6 @@ _brew_cask_list() {
'*::token:__brew_installed_casks'
}
_brew_cask_ls() {
_brew_cask_list
}
_brew_cask_outdated() {
_arguments : \
'--greedy:also list Casks with auto_updates or version \:latest' \