mirror of
git://git.code.sf.net/p/zsh/code
synced 2025-01-09 19:51:26 +01:00
18347: fix problems with having more than one ((val\:desc ...)) style action
This commit is contained in:
parent
712d39a2c7
commit
5df8ef1e43
2 changed files with 7 additions and 3 deletions
|
@ -1,3 +1,8 @@
|
|||
2003-03-13 Oliver Kiddle <opk@zsh.org>
|
||||
|
||||
* 18347: Completion/Base/Utility/_alternative: fix problems
|
||||
with having more than one ((val\:desc ...)) style action
|
||||
|
||||
2003-03-12 Oliver Kiddle <opk@zsh.org>
|
||||
|
||||
* 18346: Completion/Unix/Command/_cdcd, Completion/Unix/Type/_users,
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
#autoload
|
||||
|
||||
local tags def expl descr action mesgs nm="$compstate[nmatches]" subopts
|
||||
local opt curcontext="$curcontext"
|
||||
local opt ws curcontext="$curcontext"
|
||||
|
||||
subopts=()
|
||||
while getopts 'O:C:' opt; do
|
||||
|
@ -33,13 +33,12 @@ while _tags; do
|
|||
|
||||
mesgs=( "$mesgs[@]" "${def%%:*}:$descr")
|
||||
elif [[ "$action" = \(\(*\)\) ]]; then
|
||||
local ws
|
||||
|
||||
# ((...)) contains literal strings with descriptions.
|
||||
|
||||
eval ws\=\( "${action[3,-3]}" \)
|
||||
|
||||
_describe "$descr" ws -M 'r:|[_-]=* r:|=*' "$subopts[@]"
|
||||
_describe -t "${def%%:*}" "$descr" ws -M 'r:|[_-]=* r:|=*' "$subopts[@]"
|
||||
elif [[ "$action" = \(*\) ]]; then
|
||||
|
||||
# Anything inside `(...)' is added directly.
|
||||
|
|
Loading…
Reference in a new issue