From: "Bart Schaefer" <schaefer@brasslantern.com>
To: Peter Stephenson <pws@csr.com>,
zsh-workers@sunsite.dk (Zsh hackers list)
Subject: Re: Completion after zle doesn't work
Date: Fri, 1 Mar 2002 05:07:07 +0000 [thread overview]
Message-ID: <1020301050708.ZM17810@candle.brasslantern.com> (raw)
In-Reply-To: <2301.1014830039@csr.com>
On Feb 27, 5:13pm, Peter Stephenson wrote:
} Subject: Completion after zle doesn't work
}
} hangs until I type ^C. Unfortunately ^X? does something even more
} disastrous (seems to mess up the tty), but I did get a 1/2 MB output
The zle completion bug was introduced by Oliver in 16464. There's an
infinite loop in _zle:
while (( $#state )); do
# ...
(widget*)
_wanted -C "$context[1]" widgets expl widget compadd -k widgets && ret=0
[[ $st != *function ]] && continue
;& # ^^^^^^^^ Ooops!
(function)
_wanted -C "$context[1]" functions expl 'widget shell function' \
compadd -k functions && ret=0
;;
# ...
esac
16464 removed `local st' but this code is still testing it and looping.
I'm not sure exactly what's going on with ^X? there -- it appears that
the interrupt is not being handled correctly; you can break out of the
loop only when not doing _complete_debug.
Anyway, here's the minimalist patch for _zle, but I'm not sure that it
couldn't be done more cleanly some other way.
Index: _zle
===================================================================
RCS file: /extra/cvsroot/zsh/zsh-4.0/Completion/Zsh/Command/_zle,v
retrieving revision 1.2
diff -c -r1.2 _zle
--- _zle 2002/02/04 19:48:20 1.2
+++ _zle 2002/03/01 05:03:51
@@ -46,9 +46,9 @@
;;
(widget*)
_wanted -C "$context[1]" widgets expl widget compadd -k widgets && ret=0
- [[ $st != *function ]] && continue
;&
(function)
+ [[ $state[1] != *function ]] || # Handle fall-through
_wanted -C "$context[1]" functions expl 'widget shell function' \
compadd -k functions && ret=0
;;
--
Bart Schaefer Brass Lantern Enterprises
http://www.well.com/user/barts http://www.brasslantern.com
Zsh: http://www.zsh.org | PHPerl Project: http://phperl.sourceforge.net
prev parent reply other threads:[~2002-03-01 5:07 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2002-02-27 17:13 Peter Stephenson
2002-03-01 5:07 ` Bart Schaefer [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1020301050708.ZM17810@candle.brasslantern.com \
--to=schaefer@brasslantern.com \
--cc=pws@csr.com \
--cc=zsh-workers@sunsite.dk \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.vuxu.org/mirror/zsh/
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).