diff options
| author | Dan Martinez | 2015-05-05 15:29:01 -0700 |
|---|---|---|
| committer | Mike McQuaid | 2015-09-08 15:23:37 +0100 |
| commit | 837437416840d4c4f132b7e4ba2ea0fa2f861668 (patch) | |
| tree | a05615c66686eb93cf7cea2b5d8eed66e82be4f2 /Library/Contributions | |
| parent | c4ceaabfc19bedc70be53f2df2be7546bb9286e8 (diff) | |
| download | brew-837437416840d4c4f132b7e4ba2ea0fa2f861668.tar.bz2 | |
Improve description searching and add a cache.
Closes Homebrew/homebrew#42281.
Signed-off-by: Mike McQuaid <mike@mikemcquaid.com>
Diffstat (limited to 'Library/Contributions')
| -rw-r--r-- | Library/Contributions/brew_bash_completion.sh | 13 | ||||
| -rw-r--r-- | Library/Contributions/brew_zsh_completion.zsh | 3 |
2 files changed, 15 insertions, 1 deletions
diff --git a/Library/Contributions/brew_bash_completion.sh b/Library/Contributions/brew_bash_completion.sh index 5c2992126..83087ea54 100644 --- a/Library/Contributions/brew_bash_completion.sh +++ b/Library/Contributions/brew_bash_completion.sh @@ -195,6 +195,18 @@ _brew_deps () __brew_complete_formulae } +_brew_desc () +{ + local cur="${COMP_WORDS[COMP_CWORD]}" + case "$cur" in + --*) + __brewcomp "--search --name --description" + return + ;; + esac + __brew_complete_formulae +} + _brew_doctor () { local cur="${COMP_WORDS[COMP_CWORD]}" __brewcomp "$(brew doctor --list-checks)" @@ -599,6 +611,7 @@ _brew () cleanup) _brew_cleanup ;; create) _brew_create ;; deps) _brew_deps ;; + desc) _brew_desc ;; doctor|dr) _brew_doctor ;; diy|configure) _brew_diy ;; fetch) _brew_fetch ;; diff --git a/Library/Contributions/brew_zsh_completion.zsh b/Library/Contributions/brew_zsh_completion.zsh index dec63b84d..27faa339a 100644 --- a/Library/Contributions/brew_zsh_completion.zsh +++ b/Library/Contributions/brew_zsh_completion.zsh @@ -40,6 +40,7 @@ _1st_arguments=( 'config:show homebrew and system configuration' 'create:create a new formula' 'deps:list dependencies and dependants of a formula' + 'desc:display a description of a formula' 'doctor:audits your installation for common issues' 'edit:edit a formula' 'fetch:download formula resources to the cache' @@ -95,7 +96,7 @@ if (( CURRENT == 1 )); then fi case "$words[1]" in - install|reinstall|audit|home|homepage|log|info|abv|uses|cat|deps|edit|options|switch) + install|reinstall|audit|home|homepage|log|info|abv|uses|cat|deps|desc|edit|options|switch) _brew_all_formulae _wanted formulae expl 'all formulae' compadd -a formulae ;; list|ls) |
