aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndrew Janke2018-01-15 18:59:42 -0500
committerAndrew Janke2018-01-15 18:59:42 -0500
commit544b45ac1cd3115c369e01afa8709fbf84b218e2 (patch)
treeafc77593de048ec186b2e17613ea6ff911c5420f
parent3e8b0577fae5aaa3afaa3d38aae9d1ff55207412 (diff)
downloadbrew-544b45ac1cd3115c369e01afa8709fbf84b218e2.tar.bz2
cask bash completion: have upgrade only complete outdated packages
-rw-r--r--completions/bash/brew9
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 ()