diff options
author | Doug Kearns <dkearns@users.sourceforge.net> | 2009-01-24 13:59:21 +0000 |
---|---|---|
committer | Doug Kearns <dkearns@users.sourceforge.net> | 2009-01-24 13:59:21 +0000 |
commit | f99436b3a98dfbb86b3dd547d5c58a412b967bd7 (patch) | |
tree | de82ec25ac89d85ea97e923bee3073c1ec88501e /Completion/Cygwin/Command/_cygcheck | |
parent | fa322e5464c8d78fa0c3ac83d3032b51d8120938 (diff) | |
download | zsh-f99436b3a98dfbb86b3dd547d5c58a412b967bd7.tar.gz zsh-f99436b3a98dfbb86b3dd547d5c58a412b967bd7.tar.xz zsh-f99436b3a98dfbb86b3dd547d5c58a412b967bd7.zip |
26411: update Cygwin completion functions
Diffstat (limited to 'Completion/Cygwin/Command/_cygcheck')
-rw-r--r-- | Completion/Cygwin/Command/_cygcheck | 39 |
1 files changed, 28 insertions, 11 deletions
diff --git a/Completion/Cygwin/Command/_cygcheck b/Completion/Cygwin/Command/_cygcheck index d0a78a248..e0d7532e2 100644 --- a/Completion/Cygwin/Command/_cygcheck +++ b/Completion/Cygwin/Command/_cygcheck @@ -1,14 +1,31 @@ #compdef cygcheck cygcheck.exe -#Generated by Felix Rosencrantz -local context state line +# cygwin 1.5.25 + +local curcontext="$curcontext" state line expl typeset -A opt_args -_arguments \ - '(--check-setup --help -c -h)'{-c,--check-setup}'[check packages installed via setup.exe]' \ - '(--keycheck --sysinfo -k -s)'{-s,--sysinfo}'[system information (not with -k)]' \ - '(--verbose -v)'{-v,--verbose}'[verbose output (indented) (for -s or programs)]' \ - '(--registry -r)'{-r,--registry}'[registry search (requires -s)]' \ - '(--keycheck --sysinfo -k -s)'{-k,--keycheck}'[perform a keyboard check session (not with -s)]' \ - '(--check-setup --help -c -h)'{-h,--help}'[give help about the info (not with -c)]' \ - '(--version -V)'{-V,--version}'[output version information and exit]' \ - '*:program: _command_names -e:*::program arguments: _normal' + +local -a exclusive_opts +exclusive_opts=(-k --keycheck -f --find-package -l --list-package -p --package-query -h --help -V --version) + +_arguments -C -s -S \ + "(* $exclusive_opts -c --check-setup)"{-c,--check-setup}'[show installed version of the specified package and verify integrity (or for all installed packages if none specified)]:*:package:->package' \ + "(* $exclusive_opts -d --dump-only)"{-d,--dump-only}'[just list packages, do not verify (with -c)]' \ + "(* $exclusive_opts -s --sysinfo)"{-s,--sysinfo}'[produce diagnostic system information (implies -c -d)]' \ + "(* $exclusive_opts -r --registry)"{-r,--registry}'[also scan registry for Cygwin settings (with -s)]' \ + '(* -)'{-k,--keycheck}'[perform a keyboard check session (must be run from a plain console only, not from a pty/rxvt/xterm)]' \ + '(* -)'{-f,--find-package}'[find the package that specified file belongs to]:*:file:_files' \ + '(* -)'{-l,--list-package}'[list contents of the specified package (or all packages if none given)]:*:package:->package' \ + '(* -)'{-p,--package-query}'[search for the specified regexp in the entire cygwin.com package repository (requires internet connectivity)]:regexp:' \ + '(-V --version -k --keycheck -f --find-package -l --list-package -p --package-query -c --check-setup -d --dump-only -v --verbose)'{-v,--verbose}'[produce more verbose output]' \ + '(-V --version -k --keycheck -f --find-package -l --list-package -p --package-query -c --check-setup -d --dump-only -h --help)'{-h,--help}'[annotate output with explanatory comments when given with another command, otherwise print this help]' \ + '(* -)'{-V,--version}'[print the version of cygcheck and exit]' \ + '(-)*:program: _command_names -e' && return + +if [[ "$state" = package ]]; then + local -a packages + packages=( ${${${(f)"$(_call_program packages $words[1] -c -d)"}[3,-1]}%% *} ) + _wanted packages expl package compadd -a packages && return +fi + +return 1 |