diff options
| author | Xu Cheng | 2015-07-10 23:22:46 +0800 |
|---|---|---|
| committer | Xu Cheng | 2015-07-11 00:07:29 +0800 |
| commit | ca458a8ed1de8250d22cf6c48f90ab34cb47bea9 (patch) | |
| tree | b26490cece57ee19895d105530091d56dc290fc6 /Library/Contributions | |
| parent | a2d9d68591bf78ed8267d7e273c16b9043a6be1b (diff) | |
| download | brew-ca458a8ed1de8250d22cf6c48f90ab34cb47bea9.tar.bz2 | |
shell completion: support external commands
Closes Homebrew/homebrew#41519.
Signed-off-by: Xu Cheng <xucheng@me.com>
Diffstat (limited to 'Library/Contributions')
| -rw-r--r-- | Library/Contributions/brew_bash_completion.sh | 59 | ||||
| -rw-r--r-- | Library/Contributions/brew_zsh_completion.zsh | 4 |
2 files changed, 4 insertions, 59 deletions
diff --git a/Library/Contributions/brew_bash_completion.sh b/Library/Contributions/brew_bash_completion.sh index 75ecf2b13..54413357b 100644 --- a/Library/Contributions/brew_bash_completion.sh +++ b/Library/Contributions/brew_bash_completion.sh @@ -580,62 +580,7 @@ _brew () done if [[ $i -eq $COMP_CWORD ]]; then - __brewcomp " - --cache --cellar - --env --prefix --repository - aspell-dictionaries - audit - bottle - cat - cleanup - commands - config --config - create - deps - diy configure - doctor - edit - fetch - gist-logs - help - home - info abv - install - irb - leaves - linkapps - link ln - list ls - log - man - missing - options - outdated - prune - pin - postinstall - pull - readall - search - reinstall - sh - style - switch - tap - tap-readme - test - test-bot - tests - uninstall remove rm - unlink - unlinkapps - unpack - unpin - untap - update - upgrade - uses - " + __brewcomp "$(brew commands --quiet --include-aliases)" return fi @@ -677,7 +622,7 @@ _brew () uninstall|remove|rm) _brew_uninstall ;; unpack) _brew_unpack ;; unpin) __brew_complete_formulae ;; - untap) __brew_complete_tapped ;; + untap|tap-info) __brew_complete_tapped ;; update) _brew_update ;; upgrade) _brew_upgrade ;; uses) _brew_uses ;; diff --git a/Library/Contributions/brew_zsh_completion.zsh b/Library/Contributions/brew_zsh_completion.zsh index 0a30cd23f..186ebb442 100644 --- a/Library/Contributions/brew_zsh_completion.zsh +++ b/Library/Contributions/brew_zsh_completion.zsh @@ -25,7 +25,6 @@ _brew_outdated_formulae() { local -a _1st_arguments _1st_arguments=( 'audit:check formulae for Homebrew coding style' - 'bundle:look for a Brewfile and run each line as a brew command' 'cat:display formula file for a formula' 'cleanup:uninstall unused and old versions of packages' 'commands:show a list of commands' @@ -55,6 +54,7 @@ _1st_arguments=( 'update:freshen up links' 'upgrade:upgrade outdated formulae' 'uses:show formulae which depend on a formula' + `brew commands --quiet --include-aliases` ) local expl @@ -97,7 +97,7 @@ case "$words[1]" in _arguments \ '(--macports)--macports[search the macports repository]' \ '(--fink)--fink[search the fink repository]' ;; - untap) + untap|tap-info) _brew_installed_taps _wanted installed_taps expl 'installed taps' compadd -a installed_taps ;; upgrade) |
