aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--completions/bash/brew64
-rw-r--r--completions/zsh/_brew4
2 files changed, 61 insertions, 7 deletions
diff --git a/completions/bash/brew b/completions/bash/brew
index 521aea68d..f885b808d 100644
--- a/completions/bash/brew
+++ b/completions/bash/brew
@@ -638,17 +638,53 @@ _brew_cask_fetch ()
__brew_cask_complete_formulae
}
+_brew_cask_install ()
+{
+ local cur="${COMP_WORDS[COMP_CWORD]}"
+ local prv=$(__brew_caskcomp_prev)
+ case "$cur" in
+ -*)
+ __brew_caskcomp "--force --skip-cask-deps --require-sha --language"
+ return
+ ;;
+ esac
+ __brew_cask_complete_formulae
+}
+
_brew_cask_list ()
{
local cur="${COMP_WORDS[COMP_CWORD]}"
+ case "$cur" in
+ -*)
+ __brew_caskcomp "-1 --versions"
+ return
+ ;;
+ esac
+ __brew_cask_complete_installed
+}
+
+_brew_cask_outdated ()
+{
+ local cur="${COMP_WORDS[COMP_CWORD]}"
case "$cur" in
-*)
- __brew_caskcomp "-1 -l --versions"
+ __brew_caskcomp "--greedy --verbose --quiet"
return
;;
esac
+ __brew_cask_complete_installed
+}
+_brew_cask_style ()
+{
+ local cur="${COMP_WORDS[COMP_CWORD]}"
+ case "$cur" in
+ -*)
+ __brew_caskcomp "--fix"
+ return
+ ;;
+ esac
__brew_cask_complete_installed
}
@@ -664,6 +700,18 @@ _brew_cask_uninstall ()
__brew_cask_complete_installed
}
+_brew_cask_upgrade ()
+{
+ local cur="${COMP_WORDS[COMP_CWORD]}"
+ case "$cur" in
+ -*)
+ __brew_caskcomp "--force --greedy"
+ return
+ ;;
+ esac
+ __brew_cask_complete_installed
+}
+
_brew_cask ()
{
local i=1 cmd
@@ -689,24 +737,30 @@ _brew_cask ()
done
if [[ $i -eq $COMP_CWORD ]]; then
- __brew_caskcomp "abv audit cat cleanup create doctor edit fetch home info install list ls remove rm search uninstall zap -S --force --caskroom --verbose --appdir --colorpickerdir --prefpanedir --qlplugindir --fontdir --servicedir --input_methoddir --internet_plugindir --screen_saverdir --no-binaries --binarydir --debug"
+ __brew_caskcomp "abv audit cat cleanup create doctor edit fetch home info install list ls outdated reinstall remove rm search style uninstall upgrade zap -S --force --caskroom --verbose --appdir --colorpickerdir --prefpanedir --qlplugindir --fontdir --servicedir --input_methoddir --internet_plugindir --screen_saverdir --no-binaries --debug --version"
return
fi
# subcommands have their own completion functions
case "$cmd" in
+ --version) __brewcomp_null ;;
audit) __brew_cask_complete_formulae ;;
cat) __brew_cask_complete_formulae ;;
cleanup) _brew_cask_cleanup ;;
- doctor) ;;
+ create) ;;
+ doctor) __brewcomp_null ;;
edit) __brew_cask_complete_formulae ;;
fetch) _brew_cask_fetch ;;
home) __brew_cask_complete_formulae ;;
info|abv) __brew_cask_complete_formulae ;;
- install|instal) __brew_cask_complete_formulae ;;
+ install|instal) _brew_cask_install ;;
list|ls) _brew_cask_list ;;
- search) ;;
+ outdated) _brew_cask_outdated ;;
+ reinstall) __brew_cask_complete_installed ;;
+ search) __brewcomp_null ;;
+ style) _brew_cask_style ;;
uninstall|remove|rm) _brew_cask_uninstall ;;
+ upgrade) _brew_cask_upgrade ;;
zap) __brew_cask_complete_caskroom ;;
*) ;;
esac
diff --git a/completions/zsh/_brew b/completions/zsh/_brew
index 22792860d..e4f874bfb 100644
--- a/completions/zsh/_brew
+++ b/completions/zsh/_brew
@@ -711,7 +711,7 @@ _brew_uninstall() {
# brew unlink [--dry-run] formula:
_brew_unlink() {
_arguments \
- '(--dry-run =n)'{--dry-run,=n}'[don''t unlink or delete any files]' \
+ '(--dry-run -n)'{--dry-run,-n}'[don''t unlink or delete any files]' \
':formula:__brew_installed_formulae'
}
@@ -719,7 +719,7 @@ _brew_unlink() {
_brew_unlinkapps() {
_arguments \
'(--local)--local[remove symlinks from ~/Applications instead of the system directory]' \
- '(--dry-run =n)'{--dry-run,-n}'[don''t unlink or delete any files]' \
+ '(--dry-run -n)'{--dry-run,-n}'[don''t unlink or delete any files]' \
':formula:__brew_installed_formulae'
}