summary refs log tree commit diff
path: root/Completion/Debian/_dpkg
diff options
context:
space:
mode:
authorClint Adams <clint@users.sourceforge.net>2000-06-16 15:22:26 +0000
committerClint Adams <clint@users.sourceforge.net>2000-06-16 15:22:26 +0000
commit19efbf7dd251ac08357715db766bc95109cde54a (patch)
tree6a963c579d0188cc85de7f1fedbb2319bcaf79a3 /Completion/Debian/_dpkg
parent1416862b6311f67848a35ea5b4cc8ed7d5fb7fbc (diff)
downloadzsh-19efbf7dd251ac08357715db766bc95109cde54a.tar.gz
zsh-19efbf7dd251ac08357715db766bc95109cde54a.tar.xz
zsh-19efbf7dd251ac08357715db766bc95109cde54a.zip
11951: _dpkg tweak for install and record-avail
Diffstat (limited to 'Completion/Debian/_dpkg')
-rw-r--r--Completion/Debian/_dpkg7
1 files changed, 5 insertions, 2 deletions
diff --git a/Completion/Debian/_dpkg b/Completion/Debian/_dpkg
index 49de7a6af..75d8d0c18 100644
--- a/Completion/Debian/_dpkg
+++ b/Completion/Debian/_dpkg
@@ -1,7 +1,7 @@
 #compdef dpkg dpkg-deb
 
 local _dpkg_deb_actions _dpkg_common_actions _dpkg_actions _dpkg_options
-local _dpkg_options_recursive
+local _dpkg_options_recursive _dpkg_actions_install _dpkg_actions_record_avail
 local curcontext="$curcontext" context state line expl ret
 typeset -A opt_args
 
@@ -81,6 +81,8 @@ _dpkg_options=('--abort-after[abort after errors]:number of errors:' \
            --{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_actions_install=('(--install)-i[install]' '(-i)--install')
+_dpkg_actions_record_avail=('(--record-avail)-A[record available]' '(-A)--record-avail')
 
 case "${words[1]:t}" in
 dpkg)
@@ -102,7 +104,8 @@ esac
 case "$state" in
   install|record_avail)
         _funcall ret _dpkg_$state && return ret
-        _arguments -C -A "-*" -s "$_dpkg_options[@]" \
+        _arguments -C -s "$_dpkg_options[@]" \
+           "${(@e):-\$_dpkg_actions_${state}}" \
 	   - recur \
 	   '(--recursive)-R[recursive]' \
 	   '(-R)--recursive' \