about summary refs log tree commit diff
path: root/Completion/Debian/_dpkg
diff options
context:
space:
mode:
authorTanaka Akira <akr@users.sourceforge.net>1999-12-22 17:19:44 +0000
committerTanaka Akira <akr@users.sourceforge.net>1999-12-22 17:19:44 +0000
commit26c6c332f9a835ea4404c89441bb93a2d1888024 (patch)
tree66a1e1dade90c570121ba9b850d2d4de26f0b26d /Completion/Debian/_dpkg
parent96e836b7df4fc862e04618a8925f7b29effbd9c0 (diff)
downloadzsh-26c6c332f9a835ea4404c89441bb93a2d1888024.tar.gz
zsh-26c6c332f9a835ea4404c89441bb93a2d1888024.tar.xz
zsh-26c6c332f9a835ea4404c89441bb93a2d1888024.zip
zsh-workers/9136
Diffstat (limited to 'Completion/Debian/_dpkg')
-rw-r--r--Completion/Debian/_dpkg54
1 files changed, 49 insertions, 5 deletions
diff --git a/Completion/Debian/_dpkg b/Completion/Debian/_dpkg
index d83ae1ce5..da0e605c1 100644
--- a/Completion/Debian/_dpkg
+++ b/Completion/Debian/_dpkg
@@ -1,11 +1,37 @@
-#compdef dpkg
+#compdef dpkg dpkg-deb
 
+_dpkg_deb_args=('(--build)-b[build archive]:directory:_files -/' \
+           '(-b)--build:directory:_files -/' \
+           '(--contents)-c[list contents]:Debian package:_files -g \*.deb' \
+           '(-c)--contents:Debian package:_files -g \*.deb' \
+           '(--info)-I[show info]:Debian package:_files -g \*.deb' \
+           '(-I)--info:Debian package:_files -g \*.deb' \
+           '(--field)-f[show fields]:Debian package:_files -g \*.deb' \
+           '(-f)--field:Debian package:_files -g \*.deb' \
+           '(--control)-e[extract control]:Debian package:_files -g \*.deb' \
+           '(-e)--control:Debian package:_files -g \*.deb' \
+           '(--extract)-x[extract files]:Debian package:_files -g \*.deb' \
+           '(-x)--extract:Debian package:_files -g \*.deb' \
+           '(--vextract)-X[extract and list files]:Debian package:_files -g \*.deb' \
+           '(-X)--vextract[extract and list]:Debian package:_files -g \*.deb' \
+           '--fsys-tarfile[output fs tarfile]:Debian package:_files -g \*.deb')
+
+_dpkg_common_args=('--help[show help]' \
+           '--version[show version]' \
+           '--licence[show licensing]')
+
+case "$words[1]" in
+dpkg)
 _arguments -s '(--install)-i[install packages]:Debian package:_files -g \*.deb' \
+           '--install(-i):Debian package:_files -g \*.deb' \
            '--unpack[unpack package]:Debian package:_files -g \*.deb' \
            '(--record-avail)-A[record available]:package file:_files' \
+           '(-A)--record-avail:package file:_files' \
            '--configure:package:_deb_packages installed' \
            '(--remove)-r[remove package]:package:_deb_packages installed' \
+           '(-r)--remove:package:_deb_packages installed' \
            '(--purge)-P[purge package]:package:_deb_packages installed' \
+           '(-P)--purge:package:_deb_packages installed' \
            '--get-selections[get selections]:pattern:' \
            '--set-selections[set selections]' \
            '--update-avail[update available]:package file:_files' \
@@ -13,30 +39,48 @@ _arguments -s '(--install)-i[install packages]:Debian package:_files -g \*.deb'
            '--clear-avail[clear available]' \
            '--forget-old-unavail[forget uninstalled unavailable]' \
            '(--status)-s[display package status]:packages:_deb_packages avail' \
+           '(-s)--status:packages:_deb_packages avail' \
            '(--print-avail)-p[display available details]:packages:_deb_packages avail' \
+           '(-p)--print-avail:packages:_deb_packages avail' \
            '(--listfiles)-L[list owned files]:packages:_deb_packages installed' \
+           '(-L)--listfiles:packages:_deb_packages installed' \
            '(--list)-l[list packages]:packages:_deb_packages avail' \
+           '(-l)--list:packages:_deb_packages avail' \
            '(--search)-S[search for file owner]:pattern:' \
+           '(-S)--search:pattern:' \
            '(--audit)-C[check for broken pkgs]' \
+           '(-C)--audit' \
            '--abort-after[abort after errors]:number of errors:' \
            '--print-architecture[print target architecture]' \
            '--print-gnu-build-architecture[print GNU version of target architecture]' \
            '--print-installation-architecture[print host architecture]' \
            '--compare-versions[compare version numbers]:expression:' \
-           '--help[show help]' \
-           '--version[show version]' \
-           '--licence[show licensing]' \
            '--admindir=[data directory]:directory:_files -/' \
            '--root=[alternative root]:root:_files -/' \
            '--instdir=[change inst root but not data dir]:_files -/' \
            '(--selected-only)-O[skip unselected packages]' \
+           '(-O)--selected-only' \
            '(--skip-same-version)-E[skip packages with same version as installed]' \
+           '(-E)--skip-same-version' \
            '(--refuse-downgrade)-G[skip packages with earlier version than installed]' \
+           '(-G)--refuse-downgrade' \
            '(--auto-deconfigure)-B[install can break other packages]' \
+           '(-B)--auto-deconfigure' \
            '--largemem[optimize for >4Mb RAM]' \
            '--smallmem[optimize for <4Mb RAM]' \
            '--no-act[show potential actions but do not follow through]' \
            '-D+[debug options]:debug options:(h 1 2 3)' \
            '--debug=[debug options]:debug options:(help 1 2 3)' \
            '--ignore-depends=[ignore depends involving package]:package:_deb_packages avail' \
-           --{force,refuse,no-force}'--[forcing options]:what:(auto-select downgrade configure-any hold bad-path not-root overwrite overwrite-diverted depends-version depends confnew confold confdef confmiss conflicts architecture overwrite-dir remove-reinstreq remove-essential)'
+           --{force,refuse,no-force}'--[forcing options]:what:(auto-select downgrade configure-any hold bad-path not-root overwrite overwrite-diverted depends-version depends confnew confold confdef confmiss conflicts architecture overwrite-dir remove-reinstreq remove-essential)' \
+           "$_dpkg_deb_args[@]" \
+           "$_dpkg_common_args[@]"
+;;
+
+dpkg-deb)
+_arguments "$_dpkg_deb_args[@]" \
+           "$_dpkg_common_args[@]"
+
+;;
+
+esac