Merge pull request #686 from vladshablinsky/completions

Add completions for --fetch-HEAD flag
This commit is contained in:
Mike McQuaid 2016-08-12 20:25:10 +01:00 committed by GitHub
commit b3ea5c2595
2 changed files with 3 additions and 1 deletions

View File

@ -343,7 +343,7 @@ _brew_outdated() {
local cur="${COMP_WORDS[COMP_CWORD]}" local cur="${COMP_WORDS[COMP_CWORD]}"
case "$cur" in case "$cur" in
--*) --*)
__brewcomp "--quiet --json=v1" __brewcomp "--quiet --json=v1 --fetch-HEAD"
return return
;; ;;
esac esac
@ -520,6 +520,7 @@ _brew_upgrade() {
--cleanup --cleanup
--debug --debug
--verbose --verbose
--fetch-HEAD
" "
return return
;; ;;

View File

@ -139,6 +139,7 @@ case "$words[1]" in
upgrade) upgrade)
_arguments \ _arguments \
'(--cleanup)--cleanup[remove previously installed formula version(s)]' \ '(--cleanup)--cleanup[remove previously installed formula version(s)]' \
'(--fetch-HEAD)--fetch-HEAD[detect outdated installation by fetching the repo]' \
'1: :->forms' && return 0 '1: :->forms' && return 0
if [[ "$state" == forms ]]; then if [[ "$state" == forms ]]; then