Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

PATCH: descriptions in a couple of Debian completions



This change gives the same descriptions to long and short options
for dpkg to make use of the option grouping. And, I've added
descriptions to the make-kpkg options.

Is something wrong with _modutils? I haven't looked in detail but
it doesn't offer me any modules after modprobe.

Oliver

Index: Completion/Debian/Command/_dpkg
===================================================================
RCS file: /cvsroot/zsh/zsh/Completion/Debian/Command/_dpkg,v
retrieving revision 1.4
diff -u -r1.4 _dpkg
--- Completion/Debian/Command/_dpkg	11 Dec 2001 20:41:54 -0000	1.4
+++ Completion/Debian/Command/_dpkg	11 Mar 2002 12:32:45 -0000
@@ -5,82 +5,68 @@
 local curcontext="$curcontext" context state line expl ret
 typeset -A opt_args
 
-_dpkg_deb_actions=('(--build)-b[build archive]:directory:_files -/' \
-           '(-b)--build:directory:_files -/' \
-           '(--contents)-c[list contents]:Debian package:_files -g \*.u\#deb' \
-           '(-c)--contents:Debian package:_files -g \*.u\#deb' \
-           '(--info)-I[show info]:Debian package:_files -g \*.u\#deb' \
-           '(-I)--info:Debian package:_files -g \*.u\#deb' \
-           '(--field)-f[show fields]:Debian package:_files -g \*.u\#deb' \
-           '(-f)--field:Debian package:_files -g \*.u\#deb' \
-           '(--control)-e[extract control]:Debian package:_files -g \*.u\#deb' \
-           '(-e)--control:Debian package:_files -g \*.u\#deb' \
-           '(--extract)-x[extract files]:Debian package:_files -g \*.u\#deb' \
-           '(-x)--extract:Debian package:_files -g \*.u\#deb' \
-           '(--vextract)-X[extract and list files]:Debian package:_files -g \*.u\#deb' \
-           '(-X)--vextract[extract and list]:Debian package:_files -g \*.u\#deb' \
-           '--fsys-tarfile[output fs tarfile]:Debian package:_files -g \*.u\#deb')
-
-_dpkg_common_actions=('--help[show help]' \
-           '--version[show version]' \
-           '(--license)--licence[show licencing]' \
-           '(--licence)--license[show licensing]')
-
-_dpkg_actions=('(--install)-i[install packages]:*:Debian packages:->install' \
-           '(-i)--install:*:Debian packages:->install' \
-           '--unpack[unpack package]:Debian package:_files -g \*.u\#deb' \
-           '--configure:*:package:->configure' \
-           '(--remove)-r[remove package]:*:package:->remove' \
-           '(-r)--remove:*:package:->remove' \
-           '(--purge)-P[purge package]:*:package:->purge' \
-           '(-P)--purge:*:package:->purge' \
-           '(--print-avail)-p[display available details]:packages:_deb_packages avail' \
-           '(-p)--print-avail:packages:_deb_packages avail' \
-           '--update-avail[update available]:package file:_files' \
-           '--merge-avail[merge available]:package file:_files' \
-           '(--record-avail)-A[record available]:*:package files:->record_avail' \
-           '(-A)--record-avail:*:package files:->record_avail' \
-           '--forget-old-unavail[forget uninstalled unavailable]' \
-           '--clear-avail[clear available]' \
-           '(--list)-l[list packages]:*:packages:->list' \
-           '(-l)--list:*:packages:->list' \
-           '(--status)-s[display package status]:*:packages:->status' \
-           '(-s)--status:*:packages:->status' \
-           '(--audit)-C[check for broken pkgs]' \
-           '(-C)--audit' \
-           '--get-selections[get selections]:pattern:' \
-           '--set-selections[set selections]' \
-	   '--yet-to-unpack[list uninstalled]' \
-           '(--listfiles)-L[list owned files]:*:packages:->listfiles' \
-           '(-L)--listfiles:*:packages:->listfiles' \
-           '(--search)-S[search for file owner]:*:pattern:->search' \
-           '(-S)--search:*:pattern:->search' \
-           '--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:= ->compare_versions')
-
-_dpkg_options=('--abort-after[abort after errors]:number of errors:' \
-           '--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)')
+_dpkg_deb_actions=(
+  '(--build -b)'{--build,-b}'[build archive]:directory:_files -/'
+  '(--contents -c)'{--contents,-c}'[list contents]:Debian package:_files -g \*.u\#deb'
+  '(--info -I)'{--info,-I}'[show info]:Debian package:_files -g \*.u\#deb'
+  '(--field -f)'{--field,-f}'[show fields]:Debian package:_files -g \*.u\#deb'
+  '(--control -e)'{--control,-e}'[extract control]:Debian package:_files -g \*.u\#deb'
+  '(--extract -x)'{--extract,-x}'[extract files]:Debian package:_files -g \*.u\#deb'
+  '(--vextract -X)'{--vextract,-X}'[extract and list files]:Debian package:_files -g \*.u\#deb'
+  '--fsys-tarfile[output fs tarfile]:Debian package:_files -g \*.u\#deb'
+)
+
+_dpkg_common_actions=(
+  '--help[show help]'
+  '--version[show version]'
+  '(--license --licence)'{--license,--licence}'[show licencing]'
+)
+
+_dpkg_actions=(
+  '(--install -i)'{--install,-i}'[install packages]:*:Debian packages:->install'
+  '--unpack[unpack package]:Debian package:_files -g \*.u\#deb'
+  '--configure[reconfigure specified packages]:*:package:->configure'
+  '(--remove -r)'{--remove,-r}'[remove package]:*:package:->remove'
+  '(--purge -P)'{--purge,-P}'[purge package]:*:package:->purge'
+  '(--print-avail -p)'{--print-avail,-p}'[display available details]:packages:_deb_packages avail'
+  '--update-avail[update available]:package file:_files'
+  '--merge-avail[merge available]:package file:_files'
+  '(--record-avail -A)'{--record-avail,-A}'[record available]:*:package files:->record_avail'
+  '--forget-old-unavail[forget uninstalled unavailable]'
+  '--clear-avail[clear available]'
+  '(--list -l)'{--list,-l}'[list packages]:*:packages:->list'
+  '(--status -s)'{--status,-s}'[display package status]:*:packages:->status'
+  '(--audit -C)'{--audit,-C}'[check for broken pkgs]'
+  '--get-selections[get selections]:pattern:'
+  '--set-selections[set selections]'
+  '--yet-to-unpack[list uninstalled]'
+  '(--listfiles, -L)'{--listfiles,-L}'[list owned files]:*:packages:->listfiles'
+  '(--search -S)'{--search,-S}'[search for file owner]:*:pattern:->search'
+  '--print-architecture[print target architecture]'
+  '--print-gnu-build-architecture'
+  '--print-installation-architecture'
+  '--compare-versions[compare version numbers]:*::expression:= ->compare_versions'
+)
+
+_dpkg_options=(
+  '--abort-after[abort after errors]:number of errors:'
+  '--admindir=[data directory]:directory:_files -/'
+  '--root=[alternative root]:root:_files -/'
+  '--instdir=[change inst root but not data dir]:_files -/'
+  '(--selected-only -O)'{--selected-only,-O}'[skip unselected packages]'
+  '(--skip-same-version -E)'{--skip-same-version,-E}'[skip packages with same version as installed]'
+  '(--refuse-downgrade -G)'{--refuse-downgrade,-G}'[skip packages with earlier version than installed]'
+  '(--auto-deconfigure -B)'{--auto-deconfigure,-B}'[install can break other packages]'
+  '--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)'
+)
 
-_dpkg_options_recursive=('(--recursive)-R[recursive]' '(-R)--recursive')
+_dpkg_options_recursive=( '(--recursive -R)'{--recursive,-R}'[recursive]' )
 
 # not needed anymore?
 #  _dpkg_actions_install=('(--install)-i[install]' '(-i)--install')
@@ -138,8 +124,8 @@
         _call_function ret _dpkg_$state && return ret
         _arguments -C -A "-*" -s '--configure' \
 	   "$_dpkg_options[@]" \
-	'(--pending)-a[pending packages]' \
-	'(-a)--pending' \
-	'*:package:_deb_packages installed'
+	  '(* --pending)-a[pending packages]' \
+	  '(* -a)--pending' \
+	  '*:package:_deb_packages installed'
   ;;
 esac
Index: Completion/Debian/Command/_make-kpkg
===================================================================
RCS file: /cvsroot/zsh/zsh/Completion/Debian/Command/_make-kpkg,v
retrieving revision 1.1
diff -u -r1.1 _make-kpkg
--- Completion/Debian/Command/_make-kpkg	17 Dec 2001 01:19:33 -0000	1.1
+++ Completion/Debian/Command/_make-kpkg	11 Mar 2002 12:32:45 -0000
@@ -1,24 +1,24 @@
 #compdef make-kpkg
 
 _arguments \
-       '--help' \
-       '--revision:number:' \
-       '--append-to-version:suffix:' \
-       '--flavour:flavour:' \
-       '--added-modules:module list:' \
-       '--added-patches:patches list' \
-       '--arch:architecture:' \
-       '--cross-compile:target:' \
-       '--subarch:subarchitecture:' \
-       '--arch-in-name' \
-       '--pgpsign:name:' \
-       '--config:target:(oldconfig config menuconfig xconfig old menu x)' \
-       '--targets' \
-       '--noexec' \
-       '--initrd' \
-       '--zimage[make zImage instead of bzImage]' \
-       '--bzimage[make bzImage instead of zImage]' \
-       '--rootcmd:root command:(sudo fakeroot)' \
-       '--us[unsigned source]' \
-       '--uc[unsigned changelog]' \
-       '*:target:(clean buildpackage binary kernel-source kernel-headers kernel-doc kernel-image build modules modules_config modules_image modules_clean configure debian libc-kheaders)'
+   '--help[display help message]' \
+   '--revision[change Debian revision number]:number:' \
+   '--append-to-version:suffix:' \
+   '--flavour[specify additional kernel sub-version]:flavour:' \
+   '--added-modules:module list:' \
+   '--added-patches:patches list' \
+   '--arch[specify architecture for cross-compilation]:architecture' \
+   '--cross-compile[specify target string]:target' \
+   '--subarch[specify subarchitecture]:subarchitecture:' \
+   '--arch-in-name[include architecture in kernel image name]' \
+   '--pgpsign[sign changes file]:name' \
+   '--config[specify configuration target]:target:(oldconfig config menuconfig xconfig old menu x)' \
+   '--targets[list known targets]' \
+   '--noexec[pass -n option to make]' \
+   '--initrd[create image suitable for initrd]' \
+   '(--bzimage)--zimage[make zImage instead of bzImage]' \
+   '(--zimage)--bzimage[make bzImage instead of zImage]' \
+   '--rootcmd[specify command for gaining root access]:root command:(sudo fakeroot)' \
+   '--us[unsigned source]' \
+   '--uc[unsigned changelog]' \
+   '*:target:(clean buildpackage binary kernel-source kernel-headers kernel-doc kernel-image build modules modules_config modules_image modules_clean configure debian libc-kheaders)'

This e-mail and any attachment is for authorised use by the intended recipient(s) only.  It may contain proprietary material, confidential information and/or be subject to legal privilege.  It should not be copied, disclosed to, retained or used by, any other party.  If you are not an intended recipient then please promptly delete this e-mail and any attachment and all copies and inform the sender.  Thank you.



Messages sorted by: Reverse Date, Date, Thread, Author