diff options
-rw-r--r-- | ChangeLog | 3 | ||||
-rw-r--r-- | Completion/Debian/Command/_update-alternatives | 21 |
2 files changed, 20 insertions, 4 deletions
diff --git a/ChangeLog b/ChangeLog index 734b2408a..463025603 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,8 @@ 2001-05-29 Clint Adams <clint@zsh.org> + * 14536: Completion/Debian/Command/_update-alternatives: + loop for multiple --slaves thanks to Sven. + * 14533: Completion/Debian/Command/_dpkg, Completion/Debian/Command/_update-alternatives: use "= ->" for states expecting positional diff --git a/Completion/Debian/Command/_update-alternatives b/Completion/Debian/Command/_update-alternatives index 1bf195828..3d85f6118 100644 --- a/Completion/Debian/Command/_update-alternatives +++ b/Completion/Debian/Command/_update-alternatives @@ -16,26 +16,39 @@ _arguments -C '--verbose' \ '--display:name:_files -W /var/lib/dpkg/alternatives' \ '--config:name:_files -W /var/lib/dpkg/alternatives' && return 0 -_call_function ret _update_alternatives_$state && return ret +while true; do case "$state" in islave) + _call_function ret _update_alternatives_$state && return ret + state= _arguments -C '1:link:_files' \ '2:name:_files -W /var/lib/dpkg/alternatives' \ '3:path:_files' \ - '--slave:*::slave:->islave' + '--slave:*::more:= ->islave' && return 0 + [[ -z $state ]] && return 1 ;; + install) + _call_function ret _update_alternatives_$state && return ret _arguments -C '1:link:_files' \ '2:name:_files -W /var/lib/dpkg/alternatives' \ '3:path:_files' \ '4:priority:' \ - '--slave:*::slave:->islave' \ + '--slave:*::slave:= ->islave' && return 0 + [[ -z $state ]] && return 1 ;; remove) + _call_function ret _update_alternatives_$state && return ret _arguments \ '1:name:_files -W /var/lib/dpkg/alternatives' \ - '2:path:_files' + '2:path:_files' && return 0 + return 1 + ;; + + *) + return 1 ;; esac +done |