aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorOliver Kiddle <opk@users.sourceforge.net>2003-08-22 16:30:28 +0000
committerOliver Kiddle <opk@users.sourceforge.net>2003-08-22 16:30:28 +0000
commit2270746356368eb20676bbfb26c82c2a06e694ec (patch)
tree90c91d1100d1145c9d7e6b16cd786b94f1f92f3f
parent2fe227ff13556508ed844e8996c8c3bc8401a4a3 (diff)
downloadzsh-2270746356368eb20676bbfb26c82c2a06e694ec.tar.gz
zsh-2270746356368eb20676bbfb26c82c2a06e694ec.tar.xz
zsh-2270746356368eb20676bbfb26c82c2a06e694ec.zip
tidy up of many completions (updates, fixes, improvements and plain aesthetics)
-rw-r--r--ChangeLog30
-rw-r--r--Completion/Base/Utility/_nothing3
-rw-r--r--Completion/Debian/Command/_bug230
-rw-r--r--Completion/Debian/Command/_debchange19
-rw-r--r--Completion/Debian/Command/_debfoster149
-rw-r--r--Completion/Debian/Command/_dpkg93
-rw-r--r--Completion/Debian/Command/_dpkg_source28
-rw-r--r--Completion/Debian/Command/_dput37
-rw-r--r--Completion/Debian/Command/_dupload35
-rw-r--r--Completion/Debian/Command/_update-alternatives59
-rw-r--r--Completion/Redhat/Command/_rpm315
-rw-r--r--Completion/Unix/Command/.distfiles2
-rw-r--r--Completion/Unix/Command/_apm41
-rw-r--r--Completion/Unix/Command/_arping36
-rw-r--r--Completion/Unix/Command/_cvs372
-rw-r--r--Completion/Unix/Command/_fakeroot10
-rw-r--r--Completion/Unix/Command/_fsh38
-rw-r--r--Completion/Unix/Command/_global68
-rw-r--r--Completion/Unix/Command/_global_tags9
-rw-r--r--Completion/Unix/Command/_imagemagick490
-rw-r--r--Completion/Unix/Command/_irssi59
-rw-r--r--Completion/Unix/Command/_mysql_utils213
-rw-r--r--Completion/Unix/Command/_pbm891
-rw-r--r--Completion/Unix/Command/_rsync193
-rw-r--r--Completion/Unix/Command/_slrn25
-rw-r--r--Completion/Unix/Command/_user_admin8
-rw-r--r--Completion/Unix/Type/.distfiles2
-rw-r--r--Completion/Unix/Type/_global_tags4
-rw-r--r--Completion/X/Type/_x_color34
29 files changed, 2385 insertions, 1108 deletions
diff --git a/ChangeLog b/ChangeLog
index 8cf2a1835..0e1475b48 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -10,6 +10,10 @@
* 18947: Completion/Unix/Command/_chown: also complete options using
_arguments
+2003-08-19 Adam Spiers <adam@spiers.net>
+
+ * unposted: Completion/Unix/Command/_irssi: fix quoting bug.
+
2003-08-16 Doug Kearns <djkea2@mugca.its.monash.edu.au>
* 18944: Completion/Unix/Command/_ruby: update ruby completion for
@@ -30,6 +34,8 @@
* 18928: Completion/Unix/Command/_cdrecord: new cdrecord completion
+ * 18927: Completion/Unix/Command/_cvs: fix recent mistake with quoting
+
2003-08-01 Peter Stephenson <pws@csr.com>
* 18920: Src/utils.c, Completion/Core/Base/_main_complete: update
@@ -45,6 +51,30 @@
* 18916: Src/utils.c: Unsetting IFS could cause segmentation
fault (any time IFS was used to join an array).
+2003-07-31 Oliver Kiddle <opk@zsh.org>
+
+ * 18914: Completion/Base/Utility/_nothing,
+ Completion/Debian/Command/_auto-apt, Completion/Debian/Command/_bug,
+ Completion/Debian/Command/_debchange,
+ Completion/Debian/Command/_debfoster,
+ Completion/Debian/Command/_debsign, Completion/Debian/Command/_dpkg,
+ Completion/Debian/Command/_dpkg_source,
+ Completion/Debian/Command/_dput, Completion/Debian/Command/_dupload,
+ Completion/Debian/Command/_update-alternatives,
+ Completion/Linux/Command/_iptables,
+ Completion/Linux/Command/_pkgtool, Completion/Redhat/Command/_rpm,
+ Completion/Unix/Command/_apm, Completion/Unix/Command/_arping,
+ Completion/Unix/Command/_cvs, Completion/Unix/Command/_fakeroot,
+ Completion/Unix/Command/_fsh, Completion/Unix/Command/_global,
+ Completion/Unix/Type/_global_tags, Completion/Unix/Command/_vorbis,
+ Completion/Unix/Command/_imagemagick, Completion/Unix/Command/_irssi,
+ Completion/Unix/Command/_mysql_utils, Completion/Unix/Command/_pbm,
+ Completion/Unix/Command/_rar, Completion/Unix/Command/_rsync,
+ Completion/Unix/Command/_slrn, Completion/Unix/Command/_user_admin,
+ Completion/X/Command/_acroread, Completion/X/Type/_x_color:
+ tidy up a number of completion functions (includes fixes, updates,
+ improvements and simple aesthetic changes)
+
2003-07-24 Oliver Kiddle <opk@zsh.org>
* 18901: baptiste daroussin (and Nikolai Weibull, 18894):
diff --git a/Completion/Base/Utility/_nothing b/Completion/Base/Utility/_nothing
new file mode 100644
index 000000000..1f69155ae
--- /dev/null
+++ b/Completion/Base/Utility/_nothing
@@ -0,0 +1,3 @@
+#compdef true false log times clear logname whoami sync
+
+_message 'no argument or option'
diff --git a/Completion/Debian/Command/_bug b/Completion/Debian/Command/_bug
index 8b87867c7..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/_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
new file mode 100644
index 000000000..274a85794
--- /dev/null
+++ b/Completion/Debian/Command/_dpkg_source
@@ -0,0 +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]'
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]' \
- '(--c