X-Git-Url: https://arthur.barton.de/cgi-bin/gitweb.cgi?p=brew-completion.git;a=blobdiff_plain;f=brew-completion.sh;h=60e92140a16f4c276d170d01cd3e6565bc34bc69;hp=e72353479d2351c57f254bbd8331b94c6a00bcab;hb=aa2efff6bb7de361f6e5404809775b8c8ddb0616;hpb=8a544f401b71c006992c5cf25482e1c03a8d6572 diff --git a/brew-completion.sh b/brew-completion.sh index e723534..60e9214 100644 --- a/brew-completion.sh +++ b/brew-completion.sh @@ -39,6 +39,7 @@ _brew() if [[ ${COMP_WORDS[i]} != -* \ || ${COMP_WORDS[i]} == "--cache" \ || ${COMP_WORDS[i]} == "--cellar" \ + || ${COMP_WORDS[i]} == "--config" \ || ${COMP_WORDS[i]} == "--prefix" ]]; then cmd=${COMP_WORDS[i]} break @@ -47,25 +48,25 @@ _brew() done case "$cmd" in - "cleanup"|"edit"|"home"|"log"|"prune" \ + "cat"|"cleanup"|"deps"|"edit"|"home"|"log"|"prune"|"uses" \ |"--cache"|"--cellar"|"--prefix") _brew_formula "$cur" return 0 ;; - "link"|"remove"|"uninstall"|"unlink") + "link"|"remove"|"rm"|"uninstall"|"unlink") _brew_formula_installed "$cur" return 0 ;; "create") if [[ "$cur" == -* ]]; then - COMPREPLY=( $(compgen -W '--macports' \ - -- "$cur") ) + COMPREPLY=( $(compgen -W '--macports --fink \ + --cache' -- "$cur") ) fi return 0 ;; "info") if [[ "$cur" == -* ]]; then - COMPREPLY=( $(compgen -W '--github' \ + COMPREPLY=( $(compgen -W '--all --github' \ -- "$cur") ) else _brew_formula "$cur" @@ -74,9 +75,10 @@ _brew() ;; "install") if [[ "$cur" == -* ]]; then - COMPREPLY=( $(compgen -W '--HEAD -H \ - --debug -d --interactive -i - --verbose -v --ignore-dependencies' \ + COMPREPLY=( $(compgen -W '--git --HEAD -H \ + --debug -d --force -f \ + --interactive -i --verbose -v \ + --ignore-dependencies --use-llvm' \ -- "$cur") ) else _brew_formula "$cur" @@ -92,9 +94,6 @@ _brew() fi return 0 ;; - "search"|"update") - return 0 - ;; *) for c in $EXTCMD; do if [ "$cmd" = "$c" ]; then @@ -105,12 +104,15 @@ _brew() esac if [[ "$cur" == -* ]]; then - COMPREPLY=( $(compgen -W '--cache --cellar --help --prefix \ - --version -v -H' -- "$cur") ) + COMPREPLY=( $(compgen -W '--cache --cellar --config \ + --env --help --prefix --version -v -H' \ + -- "$cur") ) elif [ "$cmd" = "" ]; then - COMPREPLY=( $(compgen -W 'cleanup create edit home info \ - install link list log outdated prune remove search \ - uninstall unlink update $EXTCMD' -- "$cur") ) + COMPREPLY=( $(compgen -W 'cat cleanup create deps doctor \ + edit home info install link list log outdated prune \ + remove rm search uninstall unlink up update uses \ + $EXTCMD' \ + -- "$cur") ) fi } complete -F _brew brew