mirror of
git://git.code.sf.net/p/zsh/code
synced 2025-09-30 07:10:58 +02:00
Merge from trunk of workers/{21231,21233}.
This commit is contained in:
parent
204f6c2448
commit
a758943551
1 changed files with 44 additions and 10 deletions
|
@ -1,10 +1,21 @@
|
||||||
#compdef dpkg dpkg-deb dpkg-reconfigure
|
#compdef dpkg dpkg-deb dpkg-query dpkg-reconfigure
|
||||||
|
|
||||||
local _dpkg_deb_actions _dpkg_common_actions _dpkg_actions _dpkg_options
|
local _dpkg_deb_actions _dpkg_common_actions _dpkg_actions _dpkg_options
|
||||||
local _dpkg_options_recursive _dpkg_actions_install _dpkg_actions_record_avail
|
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
|
local curcontext="$curcontext" context state line expl ret
|
||||||
typeset -A opt_args
|
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=(
|
_dpkg_deb_actions=(
|
||||||
'(--build -b)'{--build,-b}'[build archive]:directory:_files -/'
|
'(--build -b)'{--build,-b}'[build archive]:directory:_files -/'
|
||||||
'(--contents -c)'{--contents,-c}'[list contents]:Debian package:_files -g "*.u#deb(-.)"'
|
'(--contents -c)'{--contents,-c}'[list contents]:Debian package:_files -g "*.u#deb(-.)"'
|
||||||
|
@ -28,20 +39,15 @@ _dpkg_actions=(
|
||||||
'--configure[reconfigure specified packages]:*:package:->configure'
|
'--configure[reconfigure specified packages]:*:package:->configure'
|
||||||
'(--remove -r)'{--remove,-r}'[remove package]:*:package:->remove'
|
'(--remove -r)'{--remove,-r}'[remove package]:*:package:->remove'
|
||||||
'(--purge -P)'{--purge,-P}'[purge package]:*:package:->purge'
|
'(--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'
|
'--update-avail[update available]:package file:_files'
|
||||||
'--merge-avail[merge available]:package file:_files'
|
'--merge-avail[merge available]:package file:_files'
|
||||||
'(--record-avail -A)'{--record-avail,-A}'[record available]:*:package files:->record_avail'
|
'(--record-avail -A)'{--record-avail,-A}'[record available]:*:package files:->record_avail'
|
||||||
'--forget-old-unavail[forget uninstalled unavailable]'
|
'--forget-old-unavail[forget uninstalled unavailable]'
|
||||||
'--clear-avail[clear available]'
|
'--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]'
|
'(--audit -C)'{--audit,-C}'[check for broken pkgs]'
|
||||||
'--get-selections[get selections]:pattern:'
|
'--get-selections[get selections]:pattern:'
|
||||||
'--set-selections[set selections]'
|
'--set-selections[set selections]'
|
||||||
'--yet-to-unpack[list uninstalled]'
|
'--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-architecture[print target architecture]'
|
||||||
'--print-gnu-build-architecture'
|
'--print-gnu-build-architecture'
|
||||||
'--print-installation-architecture'
|
'--print-installation-architecture'
|
||||||
|
@ -50,7 +56,6 @@ _dpkg_actions=(
|
||||||
|
|
||||||
_dpkg_options=(
|
_dpkg_options=(
|
||||||
'--abort-after[abort after errors]:number of errors:'
|
'--abort-after[abort after errors]:number of errors:'
|
||||||
'--admindir=[data directory]:directory:_files -/'
|
|
||||||
'--root=[alternative root]:root:_files -/'
|
'--root=[alternative root]:root:_files -/'
|
||||||
'--instdir=[change inst root but not data dir]:_files -/'
|
'--instdir=[change inst root but not data dir]:_files -/'
|
||||||
'(--selected-only -O)'{--selected-only,-O}'[skip unselected packages]'
|
'(--selected-only -O)'{--selected-only,-O}'[skip unselected packages]'
|
||||||
|
@ -68,6 +73,23 @@ _dpkg_options=(
|
||||||
|
|
||||||
_dpkg_options_recursive=( '(--recursive -R)'{--recursive,-R}'[recursive]' )
|
_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?
|
# not needed anymore?
|
||||||
# _dpkg_actions_install=('(--install)-i[install]' '(-i)--install')
|
# _dpkg_actions_install=('(--install)-i[install]' '(-i)--install')
|
||||||
# _dpkg_actions_record_avail=('(--record-avail)-A[record available]' '(-A)--record-avail')
|
# _dpkg_actions_record_avail=('(--record-avail)-A[record available]' '(-A)--record-avail')
|
||||||
|
@ -79,12 +101,24 @@ case "$service" in
|
||||||
"$_dpkg_deb_actions[@]" \
|
"$_dpkg_deb_actions[@]" \
|
||||||
"$_dpkg_common_actions[@]" \
|
"$_dpkg_common_actions[@]" \
|
||||||
"$_dpkg_options[@]" \
|
"$_dpkg_options[@]" \
|
||||||
"$_dpkg_options_recursive[@]" && return 0
|
"$_dpkg_options_recursive[@]" \
|
||||||
|
"$_dpkg_query_actions[@]" && return 0
|
||||||
;;
|
;;
|
||||||
|
|
||||||
dpkg-deb)
|
dpkg-deb)
|
||||||
_arguments "$_dpkg_deb_actions[@]" \
|
_arguments "$_dpkg_deb_actions[@]" \
|
||||||
"$_dpkg_common_actions[@]" && return 0
|
"$_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)
|
dpkg-reconfigure)
|
||||||
_arguments -sw \
|
_arguments -sw \
|
||||||
|
|
Loading…
Reference in a new issue