Merge pull request #4360 from apjanke/remove-redundant-zsh-completion-exclusions
zsh completion: Remove redundant exclusion lists for single options
This commit is contained in:
commit
ca892f8e6c
@ -439,17 +439,17 @@ _brew_leaves() {
|
|||||||
# brew ln, link [--overwrite] [--dry-run] [--force] formulae
|
# brew ln, link [--overwrite] [--dry-run] [--force] formulae
|
||||||
_brew_link() {
|
_brew_link() {
|
||||||
_arguments \
|
_arguments \
|
||||||
'(--overwrite)--overwrite[delete files which already exist in the prefix]' \
|
'--overwrite[delete files which already exist in the prefix]' \
|
||||||
'(--dry-run -n)'{--dry-run,-n}'[list files that would be linked or deleted]' \
|
'(--dry-run -n)'{--dry-run,-n}'[list files that would be linked or deleted]' \
|
||||||
'(--force)--force[allow keg-only formulae to be linked]' \
|
'--force[allow keg-only formulae to be linked]' \
|
||||||
'*:formula:__brew_installed_formulae'
|
'*:formula:__brew_installed_formulae'
|
||||||
}
|
}
|
||||||
|
|
||||||
# brew linkage [--test] [--reverse] formulae
|
# brew linkage [--test] [--reverse] formulae
|
||||||
_brew_linkage() {
|
_brew_linkage() {
|
||||||
_arguments \
|
_arguments \
|
||||||
'(--test)--test[only display missing libraries]' \
|
'--test[only display missing libraries]' \
|
||||||
'(--reverse)--reverse[print the dylib followed by the binaries which link to it]' \
|
'--reverse[print the dylib followed by the binaries which link to it]' \
|
||||||
'*:formula:__brew_installed_formulae'
|
'*:formula:__brew_installed_formulae'
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -459,11 +459,11 @@ _brew_linkage() {
|
|||||||
_brew_list() {
|
_brew_list() {
|
||||||
local state
|
local state
|
||||||
_arguments \
|
_arguments \
|
||||||
'(--full-name)--full-name[print formulae with fully-qualified names]' \
|
'--full-name[print formulae with fully-qualified names]' \
|
||||||
'(--unbrewed)--unbrewed[files in brew --prefix not controlled by brew]' \
|
'--unbrewed[files in brew --prefix not controlled by brew]' \
|
||||||
'(--pinned)--pinned[list all versions of pinned formulae]' \
|
'--pinned[list all versions of pinned formulae]' \
|
||||||
'(--versions)--versions[list all installed versions of a formula]' \
|
'--versions[list all installed versions of a formula]' \
|
||||||
'(--multiple)--multiple[only show formulae with multiple versions installed]' \
|
'--multiple[only show formulae with multiple versions installed]' \
|
||||||
'*:: :__brew_installed_formulae'
|
'*:: :__brew_installed_formulae'
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -480,7 +480,7 @@ _brew_man() {
|
|||||||
# brew migrate [--force] formulae:
|
# brew migrate [--force] formulae:
|
||||||
_brew_migrate() {
|
_brew_migrate() {
|
||||||
_arguments \
|
_arguments \
|
||||||
'(--force)--force[treat installed formulae and passed formulae ike if they are from same taps and migrate them anyway]' \
|
'--force[treat installed formulae and passed formulae ike if they are from same taps and migrate them anyway]' \
|
||||||
'*: :__brew_formulae'
|
'*: :__brew_formulae'
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -488,7 +488,7 @@ _brew_migrate() {
|
|||||||
# TODO missing argument docs
|
# TODO missing argument docs
|
||||||
_brew_mirror() {
|
_brew_mirror() {
|
||||||
_arguments \
|
_arguments \
|
||||||
'(--test)--test' \
|
'--test' \
|
||||||
'*: :__brew_formulae'
|
'*: :__brew_formulae'
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -500,7 +500,7 @@ _brew_missing() {
|
|||||||
# brew options [--compact] (--all|--installed|formulae):
|
# brew options [--compact] (--all|--installed|formulae):
|
||||||
_brew_options() {
|
_brew_options() {
|
||||||
_arguments \
|
_arguments \
|
||||||
'(--compact)--compact' \
|
'--compact' \
|
||||||
'(--all --installed :)'{--all,--installed}'[show options for all / installed formula]' \
|
'(--all --installed :)'{--all,--installed}'[show options for all / installed formula]' \
|
||||||
'(--all --installed): :__brew_formulae'
|
'(--all --installed): :__brew_formulae'
|
||||||
}
|
}
|
||||||
@ -511,7 +511,7 @@ _brew_outdated() {
|
|||||||
'(--quiet --verbose --json)--quiet[list only the names of outdated brews]' \
|
'(--quiet --verbose --json)--quiet[list only the names of outdated brews]' \
|
||||||
'(--quiet --verbose --json)--verbose[display detailed version information]' \
|
'(--quiet --verbose --json)--verbose[display detailed version information]' \
|
||||||
'(--quiet --verbose --json)--json=-[output in JSON format]:version:(v1)' \
|
'(--quiet --verbose --json)--json=-[output in JSON format]:version:(v1)' \
|
||||||
'(--fetch-HEAD)--fetch-HEAD[detect if the HEAD installation of the formula is outdated]'
|
'--fetch-HEAD[detect if the HEAD installation of the formula is outdated]'
|
||||||
}
|
}
|
||||||
|
|
||||||
# brew pin formulae:
|
# brew pin formulae:
|
||||||
@ -535,14 +535,14 @@ _brew_prune() {
|
|||||||
# [--branch-okay] [--no-pbcopy] [--no-publish] patch-source [patch-source]
|
# [--branch-okay] [--no-pbcopy] [--no-publish] patch-source [patch-source]
|
||||||
_brew_pull() {
|
_brew_pull() {
|
||||||
_arguments \
|
_arguments \
|
||||||
'(--bottle)--bottle[handle bottles]' \
|
'--bottle[handle bottles]' \
|
||||||
'(--bump)--bump[automatically reword commit message]' \
|
'--bump[automatically reword commit message]' \
|
||||||
'(--clean)--clean[do not rewrite commits found in the pulled PR]' \
|
'--clean[do not rewrite commits found in the pulled PR]' \
|
||||||
'(--ignore-whitespace)--ignore-whitespace[ignore whitespace discrepancies when applying diffs]' \
|
'--ignore-whitespace[ignore whitespace discrepancies when applying diffs]' \
|
||||||
'(--resolve)--resolve[allow user to resolve patches that fail to apply]' \
|
'--resolve[allow user to resolve patches that fail to apply]' \
|
||||||
'(--branch-okay)--branch-okay[do not warn on pulling branches other than master]' \
|
'--branch-okay[do not warn on pulling branches other than master]' \
|
||||||
'(--no-pbcopy)--no-pbcopy[do not copy anything to the system]' \
|
'--no-pbcopy[do not copy anything to the system]' \
|
||||||
'(--no-publish)--no-publish[do no publish bottles to Bintray]' \
|
'--no-publish[do no publish bottles to Bintray]' \
|
||||||
'*:patch source: '
|
'*:patch source: '
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -562,7 +562,7 @@ _brew_reinstall() {
|
|||||||
# brew search (--debian|--fedora|--fink|--macports|--opensuse|--ubuntu) text:
|
# brew search (--debian|--fedora|--fink|--macports|--opensuse|--ubuntu) text:
|
||||||
_brew_search() {
|
_brew_search() {
|
||||||
_arguments \
|
_arguments \
|
||||||
'(--desc)--desc[include description for each package]:text: ' \
|
'(--debian --fedora --fink --macports --opensuse --ubuntu)--desc[include description for each package]:text: ' \
|
||||||
'(--desc --debian --fedora --fink --macports --opensuse --ubuntu)'{--debian,--fedora,--fink,--macports,--opensuse,--ubuntu}'[search 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]'
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -570,14 +570,14 @@ _brew_search() {
|
|||||||
# TODO missing argument docs
|
# TODO missing argument docs
|
||||||
_brew_sh() {
|
_brew_sh() {
|
||||||
_arguments \
|
_arguments \
|
||||||
'(--env)--env=-:environment:(std)'
|
'--env=-:environment:(std)'
|
||||||
}
|
}
|
||||||
|
|
||||||
# brew style [--fix] [--display-cop-names] [formulae|files]:
|
# brew style [--fix] [--display-cop-names] [formulae|files]:
|
||||||
_brew_style() {
|
_brew_style() {
|
||||||
_arguments \
|
_arguments \
|
||||||
'(--fix)--fix[fix style violations automatically]' \
|
'--fix[fix style violations automatically]' \
|
||||||
'(--display-cop-names)--display-cop-names[include RuboCop name for each violation in output]' \
|
'--display-cop-names[include RuboCop name for each violation in output]' \
|
||||||
'*::formula:__brew_formulae_or_ruby_files'
|
'*::formula:__brew_formulae_or_ruby_files'
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -601,12 +601,12 @@ _brew_tap() {
|
|||||||
_arguments \
|
_arguments \
|
||||||
- empty-args \
|
- empty-args \
|
||||||
- repo-args \
|
- repo-args \
|
||||||
'(--full)--full[perform a full clone]' \
|
'--full[perform a full clone]' \
|
||||||
'::url:_urls' \
|
'::url:_urls' \
|
||||||
- repair-args \
|
- repair-args \
|
||||||
'(--repair)--repair' \
|
'--repair' \
|
||||||
- list-pinned \
|
- list-pinned \
|
||||||
'(--list-pinned)--list-pinned[list all pinned taps]'
|
'--list-pinned[list all pinned taps]'
|
||||||
}
|
}
|
||||||
|
|
||||||
# brew tap-info:
|
# brew tap-info:
|
||||||
@ -615,7 +615,7 @@ _brew_tap() {
|
|||||||
_brew_tap_info() {
|
_brew_tap_info() {
|
||||||
_arguments \
|
_arguments \
|
||||||
'(--installed *)--installed[display information on all installed taps]' \
|
'(--installed *)--installed[display information on all installed taps]' \
|
||||||
'(--json)--json=-[print a JSON representation of taps]:version:(v1)' \
|
'--json=-[print a JSON representation of taps]:version:(v1)' \
|
||||||
'(--installed)*:taps:__brew_installed_taps'
|
'(--installed)*:taps:__brew_installed_taps'
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -641,8 +641,8 @@ _brew_tap_unpin() {
|
|||||||
_brew_test() {
|
_brew_test() {
|
||||||
_arguments \
|
_arguments \
|
||||||
'(--devel --HEAD)'{--devel,--HEAD}'[use the development / head version of the formula]' \
|
'(--devel --HEAD)'{--devel,--HEAD}'[use the development / head version of the formula]' \
|
||||||
'(--debug)--debug[launch an interactive debugger if test fails]' \
|
'--debug[launch an interactive debugger if test fails]' \
|
||||||
'(--keep-tmp)--keep-tmp[don''t delete temporary files]' \
|
'--keep-tmp[don''t delete temporary files]' \
|
||||||
'*:formula:__brew_formulae'
|
'*:formula:__brew_formulae'
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -678,20 +678,20 @@ _brew_test_bot() {
|
|||||||
# [--only=test_script:test_method] [--seed seed] [--trace] [--online]:
|
# [--only=test_script:test_method] [--seed seed] [--trace] [--online]:
|
||||||
_brew_tests() {
|
_brew_tests() {
|
||||||
_arguments \
|
_arguments \
|
||||||
'(-v)-v' \
|
'-v' \
|
||||||
'(--coverage)--coverage' \
|
'--coverage' \
|
||||||
'(--generic)--generic' \
|
'--generic' \
|
||||||
'(--no-compat)--no-compat' \
|
'--no-compat' \
|
||||||
'(--only)--only=-:test_method: ' \
|
'--only=-:test_method: ' \
|
||||||
'(--seed)--seed:seed: ' \
|
'--seed:seed: ' \
|
||||||
'(--trace)--trace' \
|
'--trace' \
|
||||||
'(--online)--online'
|
'--online'
|
||||||
}
|
}
|
||||||
|
|
||||||
# brew uninstall, rm, remove [--force] formulae:
|
# brew uninstall, rm, remove [--force] formulae:
|
||||||
_brew_uninstall() {
|
_brew_uninstall() {
|
||||||
_arguments \
|
_arguments \
|
||||||
'(--force)--force[delete all installed versions of formula]' \
|
'--force[delete all installed versions of formula]' \
|
||||||
'*:formula:__brew_installed_formulae'
|
'*:formula:__brew_installed_formulae'
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -707,7 +707,7 @@ _brew_unpack() {
|
|||||||
_arguments \
|
_arguments \
|
||||||
'(--git --patch)--git[initialize a Git repository in the unpacked source]' \
|
'(--git --patch)--git[initialize a Git repository in the unpacked source]' \
|
||||||
'(--git --patch)--patch[apply patches for formula]' \
|
'(--git --patch)--patch[apply patches for formula]' \
|
||||||
'(--destdir)--destdir=-[create subdirectories under path]:path:_directories' \
|
'--destdir=-[create subdirectories under path]:path:_directories' \
|
||||||
'*:formula:__brew_formulae'
|
'*:formula:__brew_formulae'
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -720,8 +720,8 @@ _brew_unpin() {
|
|||||||
# brew update [--merge] [--force]:
|
# brew update [--merge] [--force]:
|
||||||
_brew_update() {
|
_brew_update() {
|
||||||
_arguments \
|
_arguments \
|
||||||
'(--merge)--merge[use git merge instead of git rebase]' \
|
'--merge[use git merge instead of git rebase]' \
|
||||||
'(--force)--force[do a slower full update check]'
|
'--force[do a slower full update check]'
|
||||||
}
|
}
|
||||||
|
|
||||||
# brew update_report:
|
# brew update_report:
|
||||||
@ -734,15 +734,15 @@ _brew_update_test() {
|
|||||||
_arguments \
|
_arguments \
|
||||||
'(--commit=sha1)--commit=-[use sha1 as the start commit]:sha1: ' \
|
'(--commit=sha1)--commit=-[use sha1 as the start commit]:sha1: ' \
|
||||||
'(--before=date)--before=-[use the commit at date as the start commit]:date:_dates' \
|
'(--before=date)--before=-[use the commit at date as the start commit]:date:_dates' \
|
||||||
'(--keep-tmp)--keep-tmp[retain the temporary directory]'
|
'--keep-tmp[retain the temporary directory]'
|
||||||
}
|
}
|
||||||
|
|
||||||
# brew upgrade [install-options] [--cleanup] [--fetch-HEAD] [formulae]
|
# brew upgrade [install-options] [--cleanup] [--fetch-HEAD] [formulae]
|
||||||
# install-options is copied from brew install
|
# install-options is copied from brew install
|
||||||
_brew_upgrade() {
|
_brew_upgrade() {
|
||||||
_arguments \
|
_arguments \
|
||||||
'(--cleanup)--cleanup[remove previously installed formula version(s)]' \
|
'--cleanup[remove previously installed formula version(s)]' \
|
||||||
'(--fetch-HEAD)--fetch-HEAD[detect if the HEAD installation of the formula is outdated]' \
|
'--fetch-HEAD[detect if the HEAD installation of the formula is outdated]' \
|
||||||
- normal-install \
|
- normal-install \
|
||||||
'--debug[if brewing fails, open an interactive debugging session]' \
|
'--debug[if brewing fails, open an interactive debugging session]' \
|
||||||
-'-env=-[use standard or super environment]:environment:(std super)' \
|
-'-env=-[use standard or super environment]:environment:(std super)' \
|
||||||
@ -764,11 +764,11 @@ _brew_upgrade() {
|
|||||||
# [--skip-recommended] [--devel|--HEAD] formulae:
|
# [--skip-recommended] [--devel|--HEAD] formulae:
|
||||||
_brew_uses() {
|
_brew_uses() {
|
||||||
_arguments \
|
_arguments \
|
||||||
'(--installed)--installed[only list installed formulae]' \
|
'--installed[only list installed formulae]' \
|
||||||
'(--recursive)--recursive[resolve more than one level of dependencies]' \
|
'--recursive[resolve more than one level of dependencies]' \
|
||||||
'(--include-build)--include-build[include the :build type dependencies]' \
|
'--include-build[include the :build type dependencies]' \
|
||||||
'(--include-optional)--include-optional[include the :optional dependencies]' \
|
'--include-optional[include the :optional dependencies]' \
|
||||||
'(--skip-recommended)--skip-recommended[skip :recommended type dependencies]' \
|
'--skip-recommended[skip :recommended type dependencies]' \
|
||||||
'(--devel --HEAD)'{--devel,--HEAD}'[find cases where formula is used by development / HEAD build]' \
|
'(--devel --HEAD)'{--devel,--HEAD}'[find cases where formula is used by development / HEAD build]' \
|
||||||
'*:formula:__brew_formulae'
|
'*:formula:__brew_formulae'
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user