Respect --greedy in cask upgrade completion

This commit is contained in:
fauxpark 2019-04-01 19:40:45 +11:00
parent 439283c3df
commit 3373f73e7d

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"))
} }