Merge pull request #5965 from fauxpark/cask-complete-upgrade-greedy

Respect --greedy in cask upgrade completion
This commit is contained in:
Mike McQuaid 2019-04-01 15:06:43 +01:00 committed by GitHub
commit db02f93bb3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -629,7 +629,8 @@ __brew_cask_complete_caskroom ()
__brew_cask_complete_outdated () __brew_cask_complete_outdated ()
{ {
local cur="${COMP_WORDS[COMP_CWORD]}" local cur="${COMP_WORDS[COMP_CWORD]}"
local outdated=$(brew cask outdated --quiet) local greedy=$(__brew_caskcomp_words_include "--greedy" && echo "--greedy")
local outdated=$(brew cask outdated --quiet $greedy)
COMPREPLY=($(compgen -W "$outdated" -- "$cur")) COMPREPLY=($(compgen -W "$outdated" -- "$cur"))
} }