Merge pull request #3687 from apjanke/brew-cask-upgrade-completion-list-outdated-only

cask bash completion: have upgrade only complete outdated packages
This commit is contained in:
Mike McQuaid 2018-01-18 15:30:22 +00:00 committed by GitHub
commit 1aa8aff84a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -613,6 +613,13 @@ __brew_cask_complete_caskroom ()
COMPREPLY=($(compgen -W "$files" -- "$cur"))
}
__brew_cask_complete_outdated ()
{
local cur="${COMP_WORDS[COMP_CWORD]}"
local outdated=$(brew cask outdated --quiet)
COMPREPLY=($(compgen -W "$outdated" -- "$cur"))
}
_brew_cask_cleanup ()
{
local cur="${COMP_WORDS[COMP_CWORD]}"
@ -709,7 +716,7 @@ _brew_cask_upgrade ()
return
;;
esac
__brew_cask_complete_installed
__brew_cask_complete_outdated
}
_brew_cask ()