zsh-workers
 help / color / mirror / code / Atom feed
* Adding dpkg-query support to _dpkg patch
@ 2005-05-06 21:31 Jesse W
  0 siblings, 0 replies; only message in thread
From: Jesse W @ 2005-05-06 21:31 UTC (permalink / raw)
  To: zsh-workers

[-- Attachment #1: Type: text/plain, Size: 273 bytes --]

Here's a patch to add support to dpkg-query to _dpkg.  The one 
aditional change in it is commenting out the local defs of the two 
arrays that are already commented out.  As per clint's suggestion, it 
is attached.  Let me know if any changes are needed.

Jesse Weinstein

[-- Attachment #2: _dpkg.patch --]
[-- Type: application/octet-stream, Size: 5148 bytes --]

*** /Users/jesse/_dpkg.old	Fri May  6 13:52:18 2005
--- /Users/jesse/_dpkg2	Fri May  6 14:28:05 2005
***************
*** 1,13 ****
! #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
  local _dpkg_deb_only_actions
  local curcontext="$curcontext" context state line expl ret
  typeset -A opt_args
  
  _dpkg_deb_only_actions=(
!   '(--show -W)'{--show,-W}'[show package info]:Debian package:_files -g \*.u\#deb'
  )
  
  _dpkg_deb_actions=(
--- 1,19 ----
! #compdef dpkg dpkg-deb dpkg-query dpkg-reconfigure
  
  local _dpkg_deb_actions _dpkg_common_actions _dpkg_actions _dpkg_options
! local _dpkg_options_recursive #_dpkg_actions_install _dpkg_actions_record_avail
  local _dpkg_deb_only_actions
+ local _dpkg_deb_and_query_only_actions _dpkg_deb_and_query_only_options 
+ local _dpkg_query_actions
  local curcontext="$curcontext" context state line expl ret
  typeset -A opt_args
  
  _dpkg_deb_only_actions=(
!     '-D[debugging output]'
!     '(--new)--old[old archive format]'
!     '(--old)--new[new archive format]'
!     '--nocheck[suppress control file check]'
!     '-z+[compression level]:compression number:(1 2 3 4 5 6 7 8 9)'
  )
  
  _dpkg_deb_actions=(
***************
*** 33,52 ****
    '--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'
--- 39,53 ----
***************
*** 55,61 ****
  
  _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]'
--- 56,61 ----
***************
*** 73,78 ****
--- 73,95 ----
  
  _dpkg_options_recursive=( '(--recursive -R)'{--recursive,-R}'[recursive]' )
  
+ _dpkg_deb_and_query_only_actions=(
+     '(--show -W)'{--show,-W}'[show package info]:Debian package:_files -g \*.u\#deb'
+ )
+ 
+ _dpkg_deb_and_query_only_options=(
+     '--showformat=-[alternative format]:format: '
+ )
+ 
+ _dpkg_query_actions=(
+       '(--status -s)'{--status,-s}'[display package status]:*:packages:->status'
+       '(--print-avail -p)'{--print-avail,-p}'[display available details]:packages:_deb_packages avail'
+       '(--listfiles, -L)'{--listfiles,-L}'[list owned files]:*:packages:->listfiles'
+       '(--list -l)'{--list,-l}'[list packages]:*:packages:->list'
+       '(--search -S)'{--search,-S}'[search for file owner]:*:pattern:->search'
+       '--admindir=[data directory]:directory:_files -/'
+ )
+ 
  # not needed anymore?
  #  _dpkg_actions_install=('(--install)-i[install]' '(-i)--install')
  #  _dpkg_actions_record_avail=('(--record-avail)-A[record available]' '(-A)--record-avail')
***************
*** 84,96 ****
        "$_dpkg_deb_actions[@]" \
        "$_dpkg_common_actions[@]" \
        "$_dpkg_options[@]" \
!       "$_dpkg_options_recursive[@]" && return 0
    ;;
  
    dpkg-deb)
      _arguments "$_dpkg_deb_actions[@]" \
! 	"$_dpkg_deb_only_actions[@]" \
! 	"$_dpkg_common_actions[@]" && return 0
    ;;
    dpkg-reconfigure)
      _arguments -sw \
--- 101,124 ----
        "$_dpkg_deb_actions[@]" \
        "$_dpkg_common_actions[@]" \
        "$_dpkg_options[@]" \
!       "$_dpkg_options_recursive[@]" \
!       "$_dpkg_query_actions[@]" && return 0
    ;;
  
    dpkg-deb)
      _arguments "$_dpkg_deb_actions[@]" \
!         "$_dpkg_deb_only_actions[@]" \
!         "$_dpkg_common_actions[@]" \
!         "$_dpkg_deb_and_query_only_actions[@]" \
!         "$_dpkg_deb_and_query_only_options[@]" && return 0
! 
!   ;;
! 
!   dpkg-query)
!     _arguments "$_dpkg_query_actions[@]" \
!            "$_dpkg_common_actions[@]" \
!            "$_dpkg_deb_and_query_only_actions[@]" \
!            "$_dpkg_deb_and_query_only_options[@]" && return 0
    ;;
    dpkg-reconfigure)
      _arguments -sw \

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2005-05-06 21:29 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-05-06 21:31 Adding dpkg-query support to _dpkg patch Jesse W

Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/zsh/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).