summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog7
-rw-r--r--Completion/Zsh/Command/_zle62
2 files changed, 35 insertions, 34 deletions
diff --git a/ChangeLog b/ChangeLog
index 688c9cd13..5ab42dcc9 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2010-09-13 Peter Stephenson <pws@csr.com>
+
+ * Mikael: 28252: Completion/Zsh/Command/_zle: remove unnecessary
+ looped that caused errors.
+
2010-09-12 Peter Stephenson <p.w.stephenson@ntlworld.com>
* unposted: Doc/Zsh/builtins.yo: note exit trap runs before
@@ -13629,5 +13634,5 @@
*****************************************************
* This is used by the shell to define $ZSH_PATCHLEVEL
-* $Revision: 1.5077 $
+* $Revision: 1.5078 $
*****************************************************
diff --git a/Completion/Zsh/Command/_zle b/Completion/Zsh/Command/_zle
index a1fe136c5..80f217711 100644
--- a/Completion/Zsh/Command/_zle
+++ b/Completion/Zsh/Command/_zle
@@ -36,38 +36,34 @@ _arguments -s -S \
"(-L)-a[list all widgets]" \
'*:widget name:->widget' && ret=0
-while (( $#state )); do
- case "$state[1]" in
- (args)
- _arguments \
- '(-N)-n[numeric prefix]:number:' \
- '(-n)-N[reset numeric prefix]' \
- '(-)*:widget arguments: ' && ret=0
- ;;
- (widget*)
- _wanted -C "$context[1]" widgets expl widget compadd -k widgets && ret=0
- ;&
- (function)
- [[ $state[1] != *function ]] || # Handle fall-through
- _wanted -C "$context[1]" functions expl 'widget shell function' \
- compadd -k functions && ret=0
- ;;
- (comp-widget)
- _wanted -C "$context[1]" widgets expl 'completion widget' \
- compadd -k "widgets[(R)(*:|)(.|)(${(j(|))compwids})(|:*)]" && ret=0
- ;&
- (builtin-comp-widget)
- _wanted -C "$context[1]" widgets expl 'builtin completion widget' \
- compadd -k "widgets[(I)(.|)(${(j(|))compwids})]" && ret=0
- ;;
- (redisplay)
- _arguments -s -S '!-R' \
- "-c[clear listing]" \
- ":status line" "*:strings to list" && ret=0
- ;;
- esac
- shift 1 state
- shift 1 context
-done
+case "$state[1]" in
+ (args)
+ _arguments \
+ '(-N)-n[numeric prefix]:number:' \
+ '(-n)-N[reset numeric prefix]' \
+ '(-)*:widget arguments: ' && ret=0
+ ;;
+ (widget*)
+ _wanted -C "$context[1]" widgets expl widget compadd -k widgets && ret=0
+ ;&
+ (function)
+ [[ $state[1] != *function ]] || # Handle fall-through
+ _wanted -C "$context[1]" functions expl 'widget shell function' \
+ compadd -k functions && ret=0
+ ;;
+ (comp-widget)
+ _wanted -C "$context[1]" widgets expl 'completion widget' \
+ compadd -k "widgets[(R)(*:|)(.|)(${(j(|))compwids})(|:*)]" && ret=0
+ ;&
+ (builtin-comp-widget)
+ _wanted -C "$context[1]" widgets expl 'builtin completion widget' \
+ compadd -k "widgets[(I)(.|)(${(j(|))compwids})]" && ret=0
+ ;;
+ (redisplay)
+ _arguments -s -S '!-R' \
+ "-c[clear listing]" \
+ ":status line" "*:strings to list" && ret=0
+ ;;
+esac
return ret