Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

tweak 'brew deps' zsh completions #1306

Merged
merged 1 commit into from
Oct 17, 2016
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
tweak zsh 'brew deps' completions
  • Loading branch information
apjanke committed Oct 17, 2016
commit b7fc8191506976752299d91dc1848ebcac33b50b
23 changes: 13 additions & 10 deletions completions/zsh/_brew
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ __brew_common_commands() {
'commands:show a list of commands'
'config:show homebrew and system configuration'
'create:create a new formula'
'deps:list dependencies and dependants of a formula'
'deps:list dependencies of formulae'
'desc:display a description of a formula'
'doctor:audits your installation for common issues'
'edit:edit a formula'
Expand Down Expand Up @@ -297,23 +297,26 @@ _brew_create() {
# The filters placeholder is any combination of options --include-build, --include-optional, and --skip-recommended as documented above.
_brew_deps() {
_arguments \
'--include-build[include \:build dependencie]' \
'--include-optional[include \:optional dependencies]' \
'--skip-recommended[skip \:recommended type dependencies]' \
- formulae-deps \
'--include-build[include \:build dependencies]' \
'--include-optional[include \:optional dependencies]' \
'--skip-recommended[skip \:recommended type dependencies]' \
'--1[only show dependencies one level down, instead of recursing]' \
'-n[show dependencies in topological order]' \
'--union[show the union of dependencies for formulae, instead of the intersection]' \
'--full-name[list dependencies by their full name]' \
'--installed[only list those dependencies that are currently installed]' \
'--installed[only list currently installed dependencies, or show dependencies for all installed formulae]' \
'*:formulae:__brew_formulae' \
- tree-deps \
'--tree' \
'(*)--installed[output a tree for every installed formula]' \
'--tree[show dependencies as a tree]' \
'(*)--installed[show dependencies for all installed formulae]' \
'(--installed)*:formulae:__brew_formulae' \
- installed-all \
'(--all)--installed[show dependencies for installed formulae]' \
'(--installed)--all[Show dependencies for all available formulae]'
'--include-build[include \:build dependencies]' \
'--include-optional[include \:optional dependencies]' \
'--skip-recommended[skip \:recommended type dependencies]' \
'(--all)--installed[show dependencies for all installed formulae]' \
'(--installed)--all[show dependencies for all available formulae]'
}

# brew desc formula
Expand Down Expand Up @@ -564,7 +567,7 @@ _brew_reinstall() {
_brew_search() {
_arguments \
'(--desc)--desc[include description for each package]:text: ' \
'(--desc --debian --fedora --fink --macports --opensuse --ubuntu)'{--debian,--fedora,--fink,--macports,--opensuse,--ubuntu}'[searcg for text in given package manager''s list]'
'(--desc --debian --fedora --fink --macports --opensuse --ubuntu)'{--debian,--fedora,--fink,--macports,--opensuse,--ubuntu}'[search for text in given package manager''s list]'
}

# brew sh [--env=std]:
Expand Down