From 626e2aeb1657f112feb6d03c34bb9e9f44764c75 Mon Sep 17 00:00:00 2001 From: Tanaka Akira Date: Thu, 23 Mar 2000 04:19:26 +0000 Subject: zsh-workers/10195 --- Completion/X/_xutils | 19 +++++++++++-------- 1 file changed, 11 insertions(+), 8 deletions(-) (limited to 'Completion/X/_xutils') diff --git a/Completion/X/_xutils b/Completion/X/_xutils index 1fe6ce468..fe01a5d30 100644 --- a/Completion/X/_xutils +++ b/Completion/X/_xutils @@ -55,20 +55,23 @@ xhost) if [[ "$tmp" = *:* ]]; then if compset -P '(#b)(*):'; then type="$match[1]" - _wanted displays expl 'disallow access' && - { - compadd "$expl[@]" -M 'm:{a-z}={A-Z} r:|[:.]=* r:|=*' - \ - ${${(M)tmp:#(#i)$type:*}#(#i)$type:} || - _hosts "$expl[@]" - } + _wanted displays && + while _try displays expl 'disallow access'; do + { compadd "$expl[@]" -M 'm:{a-z}={A-Z} r:|[:.]=* r:|=*' - \ + ${${(M)tmp:#(#i)$type:*}#(#i)$type:} || + _hosts "$expl[@]" } && return 0 + done else _alternative \ 'types:name family:compadd -S: ${(L)tmp%%:*}' \ 'hosts:host:compadd ${(@)tmp#*:}' && ret=0 fi else - _wanted displays expl 'disallow access' && - { compadd "$expl[@]" -M 'm:{a-z}={A-Z} r:|[:.]=* r:|=*' - $tmp || _hosts "$expl[@]" } + _wanted displays && + while _try displays expl 'disallow access'; do + { compadd "$expl[@]" -M 'm:{a-z}={A-Z} r:|[:.]=* r:|=*' - $tmp || + _hosts "$expl[@]" } && return 0 + done fi else compset -P + -- cgit 1.4.1