diff options
author | Sven Wischnowsky <wischnow@users.sourceforge.net> | 2000-06-19 13:09:06 +0000 |
---|---|---|
committer | Sven Wischnowsky <wischnow@users.sourceforge.net> | 2000-06-19 13:09:06 +0000 |
commit | c071087d1f9850d2c6e9c690797d833c6cb6268f (patch) | |
tree | c1e4af6d82b642ecaa074b7c6497836f74a91ddf /Completion | |
parent | 030130366618816fdf35ac4d18d85fe8d959dd98 (diff) | |
download | zsh-c071087d1f9850d2c6e9c690797d833c6cb6268f.tar.gz zsh-c071087d1f9850d2c6e9c690797d833c6cb6268f.tar.xz zsh-c071087d1f9850d2c6e9c690797d833c6cb6268f.zip |
_arguments: small fix for -s and new `!...' for things not to complete (but to understand) (11985)
Diffstat (limited to 'Completion')
-rw-r--r-- | Completion/Debian/_dpkg | 24 |
1 files changed, 14 insertions, 10 deletions
diff --git a/Completion/Debian/_dpkg b/Completion/Debian/_dpkg index 75d8d0c18..abad50145 100644 --- a/Completion/Debian/_dpkg +++ b/Completion/Debian/_dpkg @@ -81,8 +81,10 @@ _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') + +# not needed anymore? +# _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) @@ -90,12 +92,12 @@ _arguments -C -s "$_dpkg_actions[@]" \ "$_dpkg_deb_actions[@]" \ "$_dpkg_common_actions[@]" \ "$_dpkg_options[@]" \ - "$_dpkg_options_recursive[@]" + "$_dpkg_options_recursive[@]" && return 0 ;; dpkg-deb) _arguments "$_dpkg_deb_actions[@]" \ - "$_dpkg_common_actions[@]" + "$_dpkg_common_actions[@]" && return 0 ;; @@ -104,14 +106,16 @@ esac case "$state" in install|record_avail) _funcall ret _dpkg_$state && return ret - _arguments -C -s "$_dpkg_options[@]" \ - "${(@e):-\$_dpkg_actions_${state}}" \ +# not needed anymore? +# "${(@e):-\$_dpkg_actions_${state}}" \ + _arguments -C -A '-*' -s \ + "$_dpkg_options[@]" \ + \!${^_dpkg_actions%%:*} \ - recur \ - '(--recursive)-R[recursive]' \ - '(-R)--recursive' \ - ':directory:_files -/' \ + "$_dpkg_options_recursive[@]" \ + ':directory:_files -/' \ - nonrecur \ - ':Debian package:_files -g \*.deb' + ':Debian package:_files -g \*.deb' ;; remove|purge|status|listfiles) _funcall ret _dpkg_$state && return ret |