Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
_zle prints _zle:shift:69: shift count must be <= $#
- X-seq: zsh-workers 28252
- From: Mikael Magnusson <mikachu@xxxxxxxxx>
- To: zsh workers <zsh-workers@xxxxxxx>
- Subject: _zle prints _zle:shift:69: shift count must be <= $#
- Date: Sun, 12 Sep 2010 12:37:02 +0200
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:received:date:message-id :subject:from:to:content-type; bh=1k7DDTTn8zoUyiAh2KbNni4ZOShOpz85yLU5G9yJcuc=; b=T2AU+PiXtJLQVxadiKGc3pBsicdgKev4TfnLo7Cx7KI6YIRMhBYAEwEunZyEP4dfy9 9CIWuyDT7tRrgYJ2nZJzV4d5GiKLTf+g38mUyLw+pb7v9K6DhxvgZxnDVLuoFremdC0n MzLdHZuKUS5nkIWfPhxeB1A1oXrEvEHQNy1tM=
- Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:date:message-id:subject:from:to:content-type; b=C+F4voL8ztV6tMOMRv9jO5ZL6yYYH5qDmJX4HooCR0hFCAV+P5NLmd/0/fp0hyenmB nZWxl9eP5k81icygE3Y0ivhyS0XA3ryMOEI75VXbXFuT0pWdCfopX/YTz2HwQLYKDCMz xL382lMjk8WgcapwnOx6AuqOuIJN5udEXRZjY=
- List-help: <mailto:zsh-workers-help@zsh.org>
- List-id: Zsh Workers List <zsh-workers.zsh.org>
- List-post: <mailto:zsh-workers@zsh.org>
- Mailing-list: contact zsh-workers-help@xxxxxxx; run by ezmlm
This seems to be because of
http://www.zsh.org/cgi-bin/mla/redirect?WORKERNUMBER=16464
The while loop over $state only ever runs once, because _arguments
unsets it. The function appears to work fine with the loop removed (at
least as well as it did with it).
diff --git a/Completion/Zsh/Command/_zle b/Completion/Zsh/Command/_zle
index a1fe136..80f2177 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
http://git.mika.l3ib.org/?p=zsh-cvs.git;a=patch;h=8f73ed88fa5c259c4d996987f1f023ec5f60f278
--
Mikael Magnusson
Messages sorted by:
Reverse Date,
Date,
Thread,
Author