diff options
Diffstat (limited to 'Completion/Debian/Command')
-rw-r--r-- | Completion/Debian/Command/_auto-apt | 68 | ||||
-rw-r--r-- | Completion/Debian/Command/_bug | 230 | ||||
-rw-r--r-- | Completion/Debian/Command/_debchange | 19 | ||||
-rw-r--r-- | Completion/Debian/Command/_debfoster | 149 | ||||
-rw-r--r-- | Completion/Debian/Command/_debsign | 25 | ||||
-rw-r--r-- | Completion/Debian/Command/_dpkg | 93 | ||||
-rw-r--r-- | Completion/Debian/Command/_dpkg_source | 51 | ||||
-rw-r--r-- | Completion/Debian/Command/_dput | 37 | ||||
-rw-r--r-- | Completion/Debian/Command/_dupload | 35 | ||||
-rw-r--r-- | Completion/Debian/Command/_update-alternatives | 103 |
10 files changed, 355 insertions, 455 deletions
diff --git a/Completion/Debian/Command/_auto-apt b/Completion/Debian/Command/_auto-apt index 92af817c1..2e6dccbc1 100644 --- a/Completion/Debian/Command/_auto-apt +++ b/Completion/Debian/Command/_auto-apt @@ -1,57 +1,31 @@ #compdef auto-apt -local expl prev ret - -prev="$words[CURRENT-1]" +local expl prev="$words[CURRENT-1]" # if there is a command in arguments ? if [[ -n $words[(r)(run|update|update-local|merge|del|check|list|search|debuilt|status)] ]] ; then - # yes, add completion for command arguments and command options - if [[ -n $words[(r)(update|update-local|merge)] && "$words[CURRENT]" = -* ]] ; then - _wanted option expl 'option' compadd - "-a" && return 0; - fi + # yes, add completion for command arguments and command options + if [[ -n $words[(r)(update|update-local|merge)] && "$words[CURRENT]" = -* ]] ; then + _wanted option expl 'option' compadd - "-a" && return; + fi - if [[ -n $words[(r)(check|list|search)] && "$words[CURRENT]" = -* ]] ; then - _wanted option expl 'option' compadd - "-v" "-f" && return 0; - fi + if [[ -n $words[(r)(check|list|search)] && "$words[CURRENT]" = -* ]] ; then + _wanted option expl 'option' compadd - "-v" "-f" && return; + fi - case $prev in - "run") - _wanted command expl 'command' _files -g '*(/,*)' && return 0 ;; - "del") - _wanted package expl 'package' _deb_packages avail && return 0 ;; - esac + case $prev in + run) _wanted command expl 'command' _files -g '*(/,*)' && return ;; + del) _wanted package expl 'package' _deb_packages avail && return ;; + esac else - # no, add completion for commands or options (and options arguments) - case $prev in - "-a") - local distribs - distribs=("main" "contrib" "non-free" "non-US" "none") - - _values -s , 'distribution' $distribs ;; - "-p") - local hooks - hooks=("exec" "open" "access" "stat" "none") - _values -s , 'hook' $hooks ;; - "-D") - _wanted file expl 'dbfile' _files ;; - "-F") - _wanted file expl 'filedb' _files ;; - *) - - local commands options - - commands=("run" "update" "update-local" "merge" "del" "check" "list" "search" "debuild" "status") - options=("-h" "-s" "-y" "-q" "-i" "-X" "-x" "-a" "-p" "-D" "-F" "-L") - - if [[ "$words[CURRENT]" = -* ]] ; then - _wanted option expl 'option' compadd - $options - else - _wanted command expl 'command' compadd $commands - fi - ;; - esac - - return 0 + _arguments \ + '-a:distribution:_values -s , distribution main contrib non-free non-US none' \ + '-p:hook:_values -s , hook exec open access stat none' \ + '-D:dbfile:_files' \ + '-F:filedb:_files' \ + -h -s -y -q -i -X -x -L \ + '*:command:(run update update-local merge del check list search debuild status)' && return fi + +return 1 diff --git a/Completion/Debian/Command/_bug b/Completion/Debian/Command/_bug index d0fe5fa39..9bd2cb569 100644 --- a/Completion/Debian/Command/_bug +++ b/Completion/Debian/Command/_bug @@ -2,140 +2,104 @@ local _bug_commonargs _rb_commonargs -_bug_commonargs=('-d[debug: send mail to postmaster@localhost]' \ - '-m[maintainer-only]' \ - '-p[print to stdout instead of mail]' \ - '-h[help]' \ - '*:package:_deb_packages installed') +_bug_commonargs=( + '-d[debug: send mail to postmaster@localhost]' + '-m[maintainer-only]' + '-p[print to stdout instead of mail]' + '-h[help]' + '*:package:_deb_packages installed' +) - -_rb_commonargs=('(--bts)-B[use alternate BTS]:system:(debian gnome kde tdyc kde-debian)' \ - '(-B)--bts=:system:(debian gnome kde tdyc kde-debian)' \ - '(--ldap)-l[enable LDAP support]' \ - '(-l)--ldap' \ - '--no-ldap[disable LDAP support]' \ - '(--http_proxy)--proxy=:proxyhost:_hosts' \ - '(--proxy)--http_proxy=:proxyhost:_hosts') +_rb_commonargs=( + '(-B --bts)'{-B,--bts=}'[use alternate BTS]:system:(debian gnome kde tdyc kde-debian)' + '(-l --ldap)'{-l,--ldap}'[enable LDAP support]' + '(-l --ldap)--no-ldap[disable LDAP support]' + '(--http_proxy)--proxy=:proxyhost:_hosts' + '(--proxy)--http_proxy=:proxyhost:_hosts' +) case "$service" in -bug) -_arguments '-c[exclude configs from report]' \ - '-f[argument is a file, not a package]' \ - '-H[special header]:custom header:' \ - '-q[quiet - no e-mail forwarding]' \ - '-s[set subject]:subject:' \ - '-S[set severity]:severity:(wishlist normal important serious grave critical)' \ - '-v[version]' \ - '-x[do not cc submitter]' \ - '-z[send configs verbatim]' \ - "$_bug_commonargs[@]" -;; - -reportbug) -_arguments '(--no-config-files)-c[exclude configs from report]' \ - '(-c)--no-config-files' \ - '(--filename)-f[argument is a file, not a package]:filename:_files' \ - '(-f)--filename=:filename:_files' \ - '(--header)-H[special header]:custom header:' \ - '(-H)--header=:custom header:' \ - '(--subject)-s[set subject]:subject:' \ - '(-s)--subject=:subject:' \ - '(--severity)-S[set severity]:severity:(wishlist normal important serious grave critical)' \ - '(-S)--severity=:severity:(wishlist normal important serious grave critical)' \ - '(--no-cc)-x[do not cc submitter]' \ - '(-x)--no-cc' \ - '(--no-compress)-z[send configs verbatim]' \ - '(-z)--no-compress[send configs verbatim]' \ - '(--af)-a[use af instead of editor]' \ - '(-a)--af[use af instead of editor]' \ - '(--no-bts-query)-b[do not check bts]' \ - '(-b)--no-bts-query' \ - '(--gpg --gnupg)-g[sign report with GnuPG]' \ - '(-g --gpg)--gnupg[sign report with GnuPG]' \ - '(-g --gnupg)--gpg[sign report with GnuPG]' \ - '(--include)-i[include text]:include file:_files' \ - '(-i)--include=:include file:_files' \ - '(--attach)-A[attach file]:attachment:_files' \ - '(-A)--attach=:attachment:_files' \ - '(--mutt)-M[use mutt instead of editor]' \ - '(-M)--mutt' \ - '(--gnus)-G[use GNUS instead of editor]' \ - '(-G)--gnus' \ - '(--editor)-e[use specified editor instead of editor]:editor:' \ - '(-e)--editor=:editor:' \ - '--mua=[use specified mua instead of editor]' \ - '--mta=[use specified mta]' \ - '(--nmh --mh)-n[use comp instead of editor]' \ - '(-n --mh)--nmh' \ - '(--nmh -n)--mh' \ - '(--output)-o[output to file instead of mail]:output file:_files' \ - '(-o)--output=:output file:_files' \ - '(--pgp)-P[sign report with PGP]' \ - '(-P)--pgp' \ - '(--class)-C:GNATS report class:' \ - '(-C)--class=:GNATS report class:' \ - '--realname=:real name:' \ - '(--replyto)--reply-to=' \ - '(--reply-to)--replyto=' \ - '--email=:originating address:' \ - '--smtphost=:SMTP server:_hosts' \ - '(--print)-p[print to stdout instead of mail]' \ - '(-p)--print' \ - '(--quiet)-q[reduce verbosity of output]' \ - '(-q)--quiet' \ - '(--no-query-source)--query-source' \ - '(--query-source)--no-query-source' \ - '(--no-debconf)--debconf' \ - '(--debconf)--no-debconf' \ - '(--query-only)-Q[do not submit]' \ - '(-Q)--query-only' \ - '(--justification)-j:justification:' \ - '(-j)--justification=:justification:' \ - '(--package-version)-V:package version:' \ - '(-V)--package-version=:package version:' \ - '(--interface)-u:user interface:' \ - '(-u)--interface=:user interface:' \ - '(--type)-t:type of report:' \ - '(-t)--type=:type of report:' \ - '--template[output a template report only]' \ - '--configure[reconfigure reportbug for this user]' \ - '(--no-check-available)--check-available' \ - '(--check-available)--no-check-available' \ - '--mode=' \ - '(--verify --no-verify)-v[verify integrity with debsums]' \ - '(--no-verify -v)--verify' \ - '(--verify -v)--no-verify' \ - '(--kudos)-k[send appreciative email to maintainer]' \ - '(-k)--kudos' \ - '--mirror=:BTS mirror:_hosts' \ - '--list-cc=:carbon copy:' \ - '--report-quiet' \ - '(--offline)-O[disable external queries]' \ - '(-O)--offline' \ - '(--query-bts --no-query-bts)-b[do not query BTS]' \ - '(-b --query-bts)--no-query-bts' \ - '(-b --no-query-bts)--query-bts' \ - '(--tags)-T[add specified tags]:tags:' \ - '(-T)--tags=:tags:' \ - '(-p)--print[print to stdout instead of mail]' \ - '(-m)--maintonly' \ - '(-d)--debug' \ - '--version' \ - '--license' \ - "$_bug_commonargs[@]" \ - "$_rb_commonargs[@]" -;; - -querybts) -_arguments '(--web)-w[launch external web browser]' \ - '(-w)--web' \ - '(--archive)-A[browse archived bugs]' \ - '(-A)--archive' \ - '(--source)-s[query for source packages rather than binary]' \ - '(-s)--source' \ - '(--version)-v[show version]' \ - '(-v)--version' \ - "$_rb_commonargs[@]" \ - '*:package:_deb_packages avail' - + bug) + _arguments \ + '-c[exclude configs from report]' \ + '-f[argument is a file, not a package]' \ + '-H[special header]:custom header:' \ + '-q[quiet - no e-mail forwarding]' \ + '-s[set subject]:subject:' \ + '-S[set severity]:severity:(wishlist normal important serious grave critical)' \ + '-v[version]' \ + '-x[do not cc submitter]' \ + '-z[send configs verbatim]' \ + "$_bug_commonargs[@]" + ;; + reportbug) + _arguments \ + '(-c --no-config-files)'{-c,--no-config-files}'[exclude configs from report]' \ + '(-f --filename)'{-f,--filename=}'[argument is a file, not a package]:filename:_files' \ + '(-H --header)'{-H,--header=}'[special header]:custom header' \ + '(-s --subject)'{-s,--subject=}'[set subject]:subject' \ + '(-S --severity)'{-S,--severity=}'[set severity]:severity:(wishlist normal important serious grave critical)' \ + '(-x --no-cc)'{-x,--no-cc}'[do not cc submitter]' \ + '(-z --no-compress)'{-z,--no-compress}'[send configs verbatim]' \ + '(-a --af)'{-a,--af}'[use af instead of editor]' \ + '(-b --no-bts-query)'{-b,--no-bts-query}'[do not check bts]' \ + '(-g --gpg --gnupg)'{-g,--gpg,--gnupg}'[sign report with GnuPG]' \ + '(-i --include)'{-i,--include}'[include text]:include file:_files' \ + '(-A --attach)'{-A,--attach=}'[attach file]:attachment:_files' \ + '(-M --mutt)'{-M,--mutt}'[use mutt instead of editor]' \ + '(-G --gnus)'{-G,--gnus}'[use GNUS instead of editor]' \ + '(-e --editor)'{-e,--editor=}'[use specified editor instead of editor]:editor' \ + '--mua=[use specified mua instead of editor]' \ + '--mta=[use specified mta]' \ + '(-n --nmh --mh)'{-n,--nmh,--mh}'[use comp instead of editor]' \ + '(-o --output)'{-o,--output=}'[output to file instead of mail]:output file:_files' \ + '(-P --pgp)'{-P,--pgp}'[sign report with PGP]' \ + '(-C --class)'{-C,--class=}':GNATS report class' \ + '--realname=:real name' \ + '(--replyto)--reply-to=' \ + '(--reply-to)--replyto=' \ + '--email=:originating address:_email_addresses' \ + '--smtphost=:SMTP server:_hosts' \ + '(-p --print)'{-p,--print}'[print to stdout instead of mail]' \ + '(-q --quiet)'{-q,--quiet}'[reduce verbosity of output]' \ + '(--no-query-source)--query-source' \ + '(--query-source)--no-query-source' \ + '(--no-debconf)--debconf' \ + '(--debconf)--no-debconf' \ + '(-Q --query-only)'{-Q,--query-only}'[do not submit]' \ + '(-j --justification)'{-j,--justification=}':justification' \ + '(-V --package-version)'{-V,--package-version=}':package version' \ + '(-u --interface)'{-u,--interface=}':user interface' \ + '(-t --type)'{-t,--type=}':type of report' \ + '--template[output a template report only]' \ + '--configure[reconfigure reportbug for this user]' \ + '(--no-check-available)--check-available' \ + '(--check-available)--no-check-available' \ + '--mode=' \ + '(-v --verify --no-verify)'{-v,--verify}'[verify integrity with debsums]' \ + '(--verify -v)--no-verify' \ + '(-k --kudos)'{-k,--kudos}'[send appreciative email to maintainer]' \ + '--mirror=:BTS mirror:_hosts' \ + '--list-cc=:carbon copy:' \ + '--report-quiet' \ + '(-O --offline)'{-O,--offline}'[disable external queries]' \ + '(-n --no-query-bts --query-bts)'{-b,--no-query-bts}'[do not query BTS]' \ + '(-b --no-query-bts)--query-bts' \ + '(-T --tags)'{-T,--tags=}'[add specified tags]:tags' \ + '(-m)--maintonly' \ + '(-d)--debug' \ + '--version' \ + '--license' \ + "$_bug_commonargs[@]" \ + "$_rb_commonargs[@]" + ;; + querybts) + _arguments \ + '(-w --web)'{-w,--web}'[launch external web browser]' \ + '(-A --archive)'{-A,--archive}'[browse archived bugs]' \ + '(-s --source)'{-s,--source}'[query for source packages rather than binary]' \ + '(-v --version)'{-v,--version}'[show version]' \ + "$_rb_commonargs[@]" \ + '*:package:_deb_packages avail' + ;; esac diff --git a/Completion/Debian/Command/_debchange b/Completion/Debian/Command/_debchange index 689329370..960194ce7 100644 --- a/Completion/Debian/Command/_debchange +++ b/Completion/Debian/Command/_debchange @@ -1,15 +1,10 @@ #compdef debchange dch=debchange _arguments \ - '(--help)-h[help]' \ - '(-h)--help' \ - '--version' \ - '(--append -a --newversion -v --increment)-i[increment]' \ - '(--append -a --newversion -v -i)--increment' \ - '(--increment -i --newversion -v --append)-a[append]' \ - '(--increment -i --newversion -v -a)--append' \ - '(--append -a --increment -i --newversion)-v[newversion]:version:' \ - '(--append -a --increment -i -v)--newversion:version:' \ - '(--preserve)-p[preserve]' \ - '(-p)--preserve' \ - ':text:' + '(-h --help)'{-h,--help}'[display help information]' \ + '--version' \ + '(--append -a --newversion -v --increment -i)'{-i,--increment}'[increment release or version number]' \ + '(--append -a --newversion -v --increment -i)'{-a,--append}'[add new changelog entry]' \ + '(--append -a --newversion -v --increment -i)'{-v,--newversion}'[specify new version number]:version:' \ + '(--preserve -p)'{-p,--preserve}'[preserve source tree directory name]' \ + ':text:' diff --git a/Completion/Debian/Command/_debfoster b/Completion/Debian/Command/_debfoster index 8f7f1b082..154d0e913 100644 --- a/Completion/Debian/Command/_debfoster +++ b/Completion/Debian/Command/_debfoster @@ -1,93 +1,68 @@ #compdef debfoster -_arguments \ -'(--verbose)-v[be a loudmouth]' \ -'(-v)--verbose[be a loudmouth]' \ -'(--version)-V[show version and copyright information]' \ -'(-V)--version[show version and copyright information]' \ -'(--help)-h[show this message]' \ -'(-h)--help[show this message]' \ -'(--quiet)-q[silently build keeper file]' \ -'(-q)--quiet[silently build keeper file]' \ -'(--force)-f[force system to conform to keeper file]' \ -'(-f)--force[force system to conform to keeper file]' \ -'(--mark-only)-m[do not install or delete packages]' \ -'(-m)--mark-only[do not install or delete packages]' \ -'(--upgrade)-u[try to upgrade dependencies]' \ -'(-u)--upgrade[try to upgrade dependencies]' \ -'(--config FILE)-c[specify configuration file]' \ -'(-c)--config FILE[specify configuration file]' \ -'(--keeperfile FILE)-k[specify keeper file]' \ -'(-k)--keeperfile FILE[specify keeper file]' \ -'(--no-keeperfile)-n[do not read keeper file]' \ -'(-n)--no-keeperfile[do not read keeper file]' \ -'(--ignore-default-rules)-i[ignore default rules]' \ -'(-i)--ignore-default-rules[ignore default rules]' \ -'(--show-keepers)-a[show packages on keeper list]' \ -'(-a)--show-keepers[show packages on keeper list]' \ -'(--show-orphans)-s[show orphaned packages]' \ -'(-s)--show-orphans[show orphaned packages]' \ -'(--show-depends)-d[show all depends of PACKAGE]:package:_deb_packages avail' \ -'(-d)--show-depends[show all depends of PACKAGE]:package:_deb_packages avail' \ -'(--show-dependents)-e[show dependents of PACKAGE]:package:_deb_packages avail' \ -'(-e)--show-dependents[show dependents of PACKAGE]:package:_deb_packages avail' \ -'(--show-providers)-p[show packages providing PACKAGE]:package:_deb_packages avail' \ -'(-p)--show-providers[show packages providing PACKAGE]:package:_deb_packages avail' \ -'(--show-related)-r[show packages brought in by PACKAGE]:package:_deb_packages avail' \ -'(-r)--show-related[show packages brought in by PACKAGE]:package:_deb_packages avail' \ -'(--use-tasks)-t[make tasks visible as packages]' \ -'(-t)--use-tasks[make tasks visible as packages]' \ -'*-'{-option,o}'[override any configuration option]:option string:->option' \ -'*:package markings: _alternative "installed:installed packages:_deb_packages -S- installed" "uninstalled:uninstalled packages:_deb_packages uninstalled"' \ -&& return 0 +local curcontext="$curcontext" state line expl ret=1 -ret=1 +_arguments -C \ + '(-v --verbose)'{-v,--verbose}'[be a loudmouth]' \ + '(-V --version)'{-V,--versuib}'[show version and copyright information]' \ + '(-h --help)'{-h,--help}'[show help information]' \ + '(-q --quiet)'{-q,--quiet}'[silently build keeper file]' \ + '(-f --force)'{-f,--force}'[force system to conform to keeper file]' \ + '(-m --mark-only)'{-m,--mark-only}'[do not install or delete packages]' \ + '(-u --upgrade)'{-u,--upgrade}'[try to upgrade dependencies]' \ + '(-c --config)'{-c,--config}'[specify configuration file]:file:_files' \ + '(-k --keeperfile)'{-k,--keeperfile}'[specify keeper file]:file:_files' \ + '(-n --no-keeperfile)'{-n,--no-keeperfile}'[do not read keeper file]' \ + '(-i --ignore-default-rules)'{-i,--ignore-default-rules}'[ignore default rules]' \ + '(-a --show-keepers)'{-a,--show-keepers}'[show packages on keeper list]' \ + '(-s --show-orphans)'{-s,--show-orphans}'[show orphaned packages]' \ + '(-d --show-depends)'{-d,--show-depends}'[show all depends of specified package]:package:_deb_packages avail' \ + '(-e --show-dependents)'{-e,--show-dependents}'[show dependents of specified package]:package:_deb_packages avail' \ + '(-p --show-providers)'{-p,--show-providers}'[show packages providing specified package]:package:_deb_packages avail' \ + '(-r --show-related)'{-r,--show-related}'[show packages brought in by specified package]:package:_deb_packages avail' \ + '(-t --use-tasks)'{-t,--use-tasks}'[make tasks visible as packages]' \ + '*-'{-option,o}'[override any configuration option]:option string:->option' \ + '*:package markings: _alternative "installed:installed packages:_deb_packages -S- installed" "uninstalled:uninstalled packages:_deb_packages uninstalled"' \ + && ret=0 -while [[ -n "$state" ]]; do - lstate="$state" - state='' - - case "$lstate" in - option) - if compset -P '*='; then - case "$IPREFIX" in - *(#i)(install|remove|info)cmd*) - _wanted values expl 'command string' _command && ret=0 - ;; - *(#i)(keeperfile|dpkg(status|available))*) - _wanted values expl 'metadata file' _files && ret=0 - ;; - *(#i)maxpriority*) - _wanted values expl 'package priority' \ - compadd required important standard optional extra ANY && ret=0 - ;; - *(#i)(use(hold|essential|predepends|recommends|suggests|tasks)|negativekeepers|verbose|force|quiet)*) - _wanted values expl 'truth value' \ - compadd yes no && ret=0 - ;; - *(#i)(no|)keepsections*) - _wanted values expl 'section' \ - compadd x11 web utils text tex sound shells science \ - otherosfs oldlibs news net misc math mail libs \ - interpreters hamradio graphics games electronics \ - editors doc devel comm base admin && ret=0 - ;; - *(#i)guessdepends*) - _wanted values expl 'name extension' \ - compadd doc dev && ret=0 - ;; - esac - else - _wanted values expl 'configure file option' \ - compadd -M 'm:{a-z}={A-Z}' -S '=' - \ - InstallCmd RemoveCmd InfoCmd KeeperFile DpkgStatus \ - DpkgAvailable MaxPriority UseHold UseEssential \ - UsePreDepends UseRecommends UseSuggests UseTasks \ - KeepSections NokeepSections GuessDepends NegativeKeepers \ - Verbose Force Quiet && ret=0 - fi - ;; - esac -done +if [[ -n "$state" ]]; then + if compset -P '*='; then + case "$IPREFIX" in + *(#i)(install|remove|info)cmd*) + _wanted values expl 'command string' _command && ret=0 + ;; + *(#i)(keeperfile|dpkg(status|available))*) + _wanted values expl 'metadata file' _files && ret=0 + ;; + *(#i)maxpriority*) + _wanted values expl 'package priority' \ + compadd required important standard optional extra ANY && ret=0 + ;; + *(#i)(use(hold|essential|predepends|recommends|suggests|tasks)|negativekeepers|verbose|force|quiet)*) + _wanted values expl 'truth value' \ + compadd yes no && ret=0 + ;; + *(#i)(no|)keepsections*) + _wanted values expl 'section' compadd \ + x11 web utils text tex sound shells science \ + otherosfs oldlibs news net misc math mail libs \ + interpreters hamradio graphics games electronics \ + editors doc devel comm base admin && ret=0 + ;; + *(#i)guessdepends*) + _wanted values expl 'name extension' \ + compadd doc dev && ret=0 + ;; + esac + else + _wanted values expl 'configure file option' \ + compadd -M 'm:{a-z}={A-Z}' -S '=' - \ + InstallCmd RemoveCmd InfoCmd KeeperFile DpkgStatus \ + DpkgAvailable MaxPriority UseHold UseEssential \ + UsePreDepends UseRecommends UseSuggests UseTasks \ + KeepSections NokeepSections GuessDepends NegativeKeepers \ + Verbose Force Quiet && ret=0 + fi +fi return ret diff --git a/Completion/Debian/Command/_debsign b/Completion/Debian/Command/_debsign index c706cb1c3..cd8c96dad 100644 --- a/Completion/Debian/Command/_debsign +++ b/Completion/Debian/Command/_debsign @@ -1,14 +1,15 @@ #compdef debsign -_arguments '-r[copy .changes file from remote host]:[username@]remotehost' \ - '-p[program with which to sign]:program name' \ - '-m[maintainer]:maintainer name and email address' \ - '-e[maintainer]:maintainer name and email address' \ - '-k[key ID to use for signing]:keyid' \ - '-s[argument style for signing program]:gpg or pgp' \ - '-S[look for source-only .changes file]' \ - '-a[architecture]:Debian architecture' \ - '-t[GNU system type]:GNU system type' \ - '--help[help]' \ - '--version[version]' \ - '*:changes or dsc file:_files -g "*.(changes|dsc)"' +_arguments \ + '-r[copy .changes file from remote host]: :_user_at_host' \ + '-p[program with which to sign]:program name' \ + '-m[maintainer]:maintainer name and email address' \ + '-e[maintainer]:maintainer name and email address' \ + '-k[key ID to use for signing]:keyid' \ + '-s[argument style for signing program]:gpg or pgp' \ + '-S[look for source-only .changes file]' \ + '-a[architecture]:Debian architecture' \ + '-t[GNU system type]:GNU system type' \ + '--help[display help information]' \ + '--version[display version information]' \ + '*:changes or dsc file:_files -g "*.(changes|dsc)"' diff --git a/Completion/Debian/Command/_dpkg b/Completion/Debian/Command/_dpkg index d8b5d9327..406428d97 100644 --- a/Completion/Debian/Command/_dpkg +++ b/Completion/Debian/Command/_dpkg @@ -1,4 +1,4 @@ -#compdef dpkg dpkg-deb +#compdef dpkg dpkg-deb dpkg-reconfigure local _dpkg_deb_actions _dpkg_common_actions _dpkg_actions _dpkg_options local _dpkg_options_recursive _dpkg_actions_install _dpkg_actions_record_avail @@ -73,63 +73,72 @@ _dpkg_options_recursive=( '(--recursive -R)'{--recursive,-R}'[recursive]' ) # _dpkg_actions_record_avail=('(--record-avail)-A[record available]' '(-A)--record-avail') case "$service" in -dpkg) -_arguments -C -s "$_dpkg_actions[@]" \ - "$_dpkg_deb_actions[@]" \ - "$_dpkg_common_actions[@]" \ - "$_dpkg_options[@]" \ - "$_dpkg_options_recursive[@]" && return 0 -;; - -dpkg-deb) -_arguments "$_dpkg_deb_actions[@]" \ - "$_dpkg_common_actions[@]" && return 0 - -;; + dpkg) + _arguments -C -s \ + "$_dpkg_actions[@]" \ + "$_dpkg_deb_actions[@]" \ + "$_dpkg_common_actions[@]" \ + "$_dpkg_options[@]" \ + "$_dpkg_options_recursive[@]" && return 0 + ;; + dpkg-deb) + _arguments "$_dpkg_deb_actions[@]" \ + "$_dpkg_common_actions[@]" && return 0 + ;; + dpkg-reconfigure) + _arguments -s \ + '(-f --frontend)'{-f,--frontend}'[select frontend to use]:frontend' \ + '(-p --priority)'{-p,--priority}'[specify min priority of questions]:priority' \ + '--default-priority[use default question priority]' \ + '(*)--all[reconfigure all installed packages using debconf]' \ + '(-u --unseen-only)'{-u,--unseen-only}'[only ask questions not yet seen are asked]' \ + '--force[reconfigure even packages in broken state]' \ + '(-)'{-h,--help}'[display help information]' \ + '*:package:_deb_packages installed' && return 0 + ;; esac case "$state" in install|record_avail) - _call_function ret _dpkg_$state && return ret + _call_function ret _dpkg_$state && return ret # not needed anymore? # "${(@e):-\$_dpkg_actions_${state}}" \ - _arguments -C -A '-*' -s \ - "$_dpkg_options[@]" \ - \!${^_dpkg_actions%%:*} \ - - recur \ - "$_dpkg_options_recursive[@]" \ - '*:directory:_path_files -/' \ - - nonrecur \ - '*:Debian package:_path_files -g \*.deb' + _arguments -C -A '-*' -s \ + "$_dpkg_options[@]" \ + \!${^_dpkg_actions%%:*} \ + - recur \ + "$_dpkg_options_recursive[@]" \ + '*:directory:_path_files -/' \ + - nonrecur \ + '*:Debian package:_path_files -g \*.deb' ;; remove|purge|status|listfiles) - _call_function ret _dpkg_$state && return ret - _arguments -C -A "-*" -s "$_dpkg_options[@]" \ - '*:package:_deb_packages installed' + _call_function ret _dpkg_$state && return ret + _arguments -C -A "-*" -s "$_dpkg_options[@]" \ + '*:package:_deb_packages installed' ;; list) - _call_function ret _dpkg_$state && return ret - _arguments -C -A "-*" -s "$_dpkg_options[@]" \ - '*:packages:_deb_packages avail' + _call_function ret _dpkg_$state && return ret + _arguments -C -A "-*" -s "$_dpkg_options[@]" \ + '*:packages:_deb_packages avail' ;; compare_versions) - _call_function ret _dpkg_$state && return ret - _arguments -C -A "-*" -s \ - '1:version A:' \ - '2:operator:(lt le eq ne ge gt lt-nl le-nl ge-nl gt-nl)' \ - '3:version B:' + _call_function ret _dpkg_$state && return ret + _arguments -C -A "-*" -s \ + '1:version A:' \ + '2:operator:(lt le eq ne ge gt lt-nl le-nl ge-nl gt-nl)' \ + '3:version B:' ;; configure) - _call_function ret _dpkg_$state && return ret - _arguments -C -A "-*" -s '--configure' \ - "$_dpkg_options[@]" \ - '(* --pending)-a[pending packages]' \ - '(* -a)--pending' \ - '*:package:_deb_packages installed' + _call_function ret _dpkg_$state && return ret + _arguments -C -A "-*" -s '--configure' \ + "$_dpkg_options[@]" \ + '(* -a --pending)'{-a,--pending}'[pending packages]' \ + '*:package:_deb_packages installed' ;; search) - _call_function ret _dpkg_$state && return ret - _files + _call_function ret _dpkg_$state && return ret + _files ;; esac diff --git a/Completion/Debian/Command/_dpkg_source b/Completion/Debian/Command/_dpkg_source index 7ae6e6ea4..274a85794 100644 --- a/Completion/Debian/Command/_dpkg_source +++ b/Completion/Debian/Command/_dpkg_source @@ -1,27 +1,28 @@ #compdef dpkg-source -_arguments '-x[specify source file]:Debian source file:_files -g \*.dsc' \ - '-b[specify source directory]:Debian source directory:_files -/' \ - '-c-[control file]:control file:_files' \ - '-l-[changelog file]:changelog file:_files' \ - '-F-[changelog format]:changelog format:' \ - '-V-[set substitutions variable]:expression:' \ - '-T-[alternate variable file]:varlistfile:' \ - '-D-[override dsc field]:expression:' \ - '-U-[remove a field]:field:' \ - '-i-[ignore files in diff]:filter:' \ - '-sa[autoselect orig source]' \ - '-sk[use packaged orig source - unpack and keep]' \ - '-sp[use packaged orig source - unpack and remove]' \ - '-su[use unpackaged orig source - unpack and keep]' \ - '-sr[use unpackaged orig source - unpack and remove]' \ - '-ss[trust packed and unpacked source are the same]' \ - '-sn[no diff, do main tarfile only]' \ - '-sA[autoselect orig source with overwrite]' \ - '-sK[use packaged orig source - unpack and keep with overwrite]' \ - '-sP[use packaged orig source - unpack and remove with overwrite]' \ - '-sU[use unpackaged orig source - unpack and keep with overwrite]' \ - '-sR[use unpackaged orig source - unpack and remove with overwrite]' \ - '-sp[leave original source packed in cwd]' \ - '-su[unpack original source tree too]' \ - '-h[help]' +_arguments \ + '-x[specify source file]:Debian source file:_files -g \*.dsc' \ + '-b[specify source directory]:Debian source directory:_files -/' \ + '-c-[control file]:control file:_files' \ + '-l-[changelog file]:changelog file:_files' \ + '-F-[changelog format]:changelog format:' \ + '-V-[set substitutions variable]:expression:' \ + '-T-[alternate variable file]:varlistfile:' \ + '-D-[override dsc field]:expression:' \ + '-U-[remove a field]:field:' \ + '-i-[ignore files in diff]:filter:' \ + '-sa[autoselect orig source]' \ + '-sk[use packaged orig source - unpack and keep]' \ + '-sp[use packaged orig source - unpack and remove]' \ + '-su[use unpackaged orig source - unpack and keep]' \ + '-sr[use unpackaged orig source - unpack and remove]' \ + '-ss[trust packed and unpacked source are the same]' \ + '-sn[no diff, do main tarfile only]' \ + '-sA[autoselect orig source with overwrite]' \ + '-sK[use packaged orig source - unpack and keep with overwrite]' \ + '-sP[use packaged orig source - unpack and remove with overwrite]' \ + '-sU[use unpackaged orig source - unpack and keep with overwrite]' \ + '-sR[use unpackaged orig source - unpack and remove with overwrite]' \ + '-sp[leave original source packed in cwd]' \ + '-su[unpack original source tree too]' \ + '-h[help]' diff --git a/Completion/Debian/Command/_dput b/Completion/Debian/Command/_dput index 5fe9847d1..64b682c6f 100644 --- a/Completion/Debian/Command/_dput +++ b/Completion/Debian/Command/_dput @@ -1,27 +1,14 @@ #compdef dput -if (( ! $+_dput_sites )); then - _dput_sites=( ${${(M)${(f)"$(</etc/dput.cf)"}:#\[*}//[][]/} ) -fi - -_arguments '(-c)--config[config file]:config file:' \ - '(--config)-c[config file]:config file:' \ - '(--debug)-d[debug mode]' \ - '(-d)--debug[debug mode]' \ - '(--dinstall)-D[run dinstall after upload]' \ - '(-D)--dinstall[run dinstall after upload]' \ - '(--force)-f[force upload of already uploaded package]' \ - '(-f)--force[force upload of already uploaded package]' \ - '(--lintian)-l[run lintian before upload]' \ - '(-l)--lintian[run lintian before upload]' \ - '(-o)--check-only[check the package, do not upload]' \ - '(--check-only)-o[check the package, do not upload]' \ - '(--print)-p[print configuration]' \ - '(-p)--print[print configuration]' \ - '(--simulate)-s[simulate an upload only]' \ - '(-s)--simulate[simulate an upload only]' \ - '(--unchecked)-u[do not check GPG signature on the changes file]' \ - '(-u)--unchecked[do not check GPG signature on the changes file]' \ - '(-v)--version[version]' \ - '(--version)-v[version]' \ - '*:changes file:_files -g \*.changes' \ +_arguments \ + '(-c --config)'{-c,--config}'[specify config file]:config file:_files' \ + '(-d --debug)'{-d,--debug}'[debug mode]' \ + '(-D --dinstall)'{-D,--dinstall}'[run dinstall after upload]' \ + '(-f --force)'{-f,--force}'[force upload of already uploaded package]' \ + '(-l --lintian)'{-l,--lintian}'[run lintian before upload]' \ + '(-o --check-only)'{-o,--check-only}'[check the package, do not upload]' \ + '(-p --print)'{-p,--print}'[print configuration]' \ + '(-s --simulate)'{-s,--simulare}'[simulate an upload only]' \ + '(-u --unchecked)'{-u,--unchecked}'[do not check GPG signature on the changes file]' \ + '(-v --version)'{-v,--version}'[show version information]' \ + '*:changes file:_files -g \*.changes' diff --git a/Completion/Debian/Command/_dupload b/Completion/Debian/Command/_dupload index 81ac73f67..4ec179688 100644 --- a/Completion/Debian/Command/_dupload +++ b/Completion/Debian/Command/_dupload @@ -2,25 +2,20 @@ if (( ! $+_dupload_sites )); then _dupload_sites=( -$(grep -hs "^\$cfg" /etc/dupload.conf ~/.dupload.conf | sed 's/^\$cfg{\([^}]*\)}.*$/\1/') -) + $(grep -hs "^\$cfg" /etc/dupload.conf ~/.dupload.conf | sed 's/^\$cfg{\([^}]*\)}.*$/\1/') + ) fi -_arguments '--to:nickname[nickname of target site]:('"$_dupload_sites"')' \ - '(--debug)-d[ftp verbosity]:debuglevel:' \ - '(-d)--debug[ftp verbosity]:debuglevel:' \ - '(--force)-f[upload ignoring logs]' \ - '(-f)--force[upload ignoring logs]' \ - '(--keep)-k[keep going, skip broken]' \ - '(-k)--keep[keep going, skip broken]' \ - '--no[dry run]' \ - '--nomail[suppress announcement]' \ - '--mailonly[dry run and real announcement]' \ - '--noarchive[add anti-archival header]' \ - '(--print)-p[print config legibly]' \ - '(-p)--print[print config legibly]' \ - '(--quiet)-q[quiet]' \ - '(-q)--quiet[quiet]' \ - '(--Version)-V[version]' \ - '(-V)--Version[version]' \ - '*:changes file:_files -g \*.changes' \ +_arguments \ + '--to:nickname[nickname of target site]:('"$_dupload_sites"')' \ + '(-d --debug)'{-d,--debug}'[ftp verbosity]:debuglevel:' \ + '(-f --force)'{-f,--force}'[upload ignoring logs]' \ + '(-k --keep)'{-k,--keep}'[keep going, skip broken]' \ + '--no[dry run]' \ + '--nomail[suppress announcement]' \ + '--mailonly[dry run and real announcement]' \ + '--noarchive[add anti-archival header]' \ + '(-p --print)'{-p,--print}'[print config legibly]' \ + '(-q --quiet)'{-q,--quiet}'[quiet]' \ + '(-V --Version)'{-V,--Version}'[display version information]' \ + '*:changes file:_files -g \*.changes' diff --git a/Completion/Debian/Command/_update-alternatives b/Completion/Debian/Command/_update-alternatives index eaeb300b8..dd1d4fce3 100644 --- a/Completion/Debian/Command/_update-alternatives +++ b/Completion/Debian/Command/_update-alternatives @@ -1,60 +1,59 @@ #compdef update-alternatives -local curcontext="$curcontext" context state line expl ret alterdir -typeset -A opt_args +local curcontext="$curcontext" context state line alterdir -if [[ -d /var/lib/dpkg/alternatives ]];then - alterdir=/var/lib/dpkg/alternatives -elif [[ -d /var/lib/rpm/alternatives/ ]];then - alterdir=/var/lib/rpm/alternatives +if [[ -d /var/lib/dpkg/alternatives ]]; then + alterdir=/var/lib/dpkg/alternatives +elif [[ -d /var/lib/rpm/alternatives/ ]]; then + alterdir=/var/lib/rpm/alternatives fi -_arguments -C '--verbose' \ - '--quiet' \ - '--test' \ - '--help' \ - '--version' \ - '--altdir:altdir:_files -/' \ - '--admindir:admindir:_files -/' \ - '--install:*::alt:= ->install' \ - '--remove:*::alt:= ->remove' \ - '--auto:name:_files -W $alterdir' \ - '--display:name:_files -W $alterdir' \ - '--config:name:_files -W $alterdir' && return 0 +_arguments -C \ + '--verbose' \ + '--quiet' \ + '--test' \ + '--help' \ + '--version' \ + '--altdir:altdir:_files -/' \ + '--admindir:admindir:_files -/' \ + '--install:*::alt:= ->install' \ + '--remove:*::alt:= ->remove' \ + '--auto:name:_files -W $alterdir' \ + '--display:name:_files -W $alterdir' \ + '--config:name:_files -W $alterdir' && return while true; do -case "$state" in - islave) - _call_function ret _update_alternatives_$state && return ret - state= - _arguments -C '1:link:_files' \ - '2:name:_files -W $alterdir' \ - '3:path:_files' \ - '--slave:*::more:= ->islave' && return 0 - [[ -z $state ]] && return 1 - ;; - - install) - _call_function ret _update_alternatives_$state && return ret - _arguments -C '1:link:_files' \ - '2:name:_files -W $alterdir' \ - '3:path:_files' \ - '4:priority:' \ - '--slave:*::slave:= ->islave' && return 0 - [[ -z $state ]] && return 1 - ;; - - remove) - _call_function ret _update_alternatives_$state && return ret - _arguments \ - '1:name:_files -W $alterdir' \ - '2:path:_files' && return 0 - return 1 - ;; - - *) - return 1 - ;; - -esac + case "$state" in + islave) + _call_function ret _update_alternatives_$state && return ret + state= + _arguments -C \ + '1:link:_files' \ + '2:name:_files -W $alterdir' \ + '3:path:_files' \ + '--slave:*::more:= ->islave' && return + [[ -z $state ]] && return 1 + ;; + + install) + _call_function ret _update_alternatives_$state && return ret + _arguments -C \ + '1:link:_files' \ + '2:name:_files -W $alterdir' \ + '3:path:_files' \ + '4:priority:' \ + '--slave:*::slave:= ->islave' && return + [[ -z $state ]] && return 1 + ;; + + remove) + _call_function ret _update_alternatives_$state && return ret + _arguments \ + '1:name:_files -W $alterdir' \ + '2:path:_files' + return + ;; + + *) return 1 ;; + esac done |