diff options
| author | Mike McQuaid | 2018-01-18 15:30:22 +0000 | 
|---|---|---|
| committer | GitHub | 2018-01-18 15:30:22 +0000 | 
| commit | 1aa8aff84ae732c95827c21dd00b8ac377ede713 (patch) | |
| tree | 9937d41889ac137a3f8a03a47850431cf48ebb1e | |
| parent | edc6efd443413bb3373015eac6391915fd1c7078 (diff) | |
| parent | 544b45ac1cd3115c369e01afa8709fbf84b218e2 (diff) | |
| download | brew-1aa8aff84ae732c95827c21dd00b8ac377ede713.tar.bz2 | |
Merge pull request #3687 from apjanke/brew-cask-upgrade-completion-list-outdated-only
cask bash completion: have upgrade only complete outdated packages
| -rw-r--r-- | completions/bash/brew | 9 | 
1 files changed, 8 insertions, 1 deletions
| diff --git a/completions/bash/brew b/completions/bash/brew index f885b808d..02c862bbd 100644 --- a/completions/bash/brew +++ b/completions/bash/brew @@ -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 () | 
