* BUG: "always" block with send-break confuses stdin parser
@ 2021-04-26 20:19 Bart Schaefer
2021-04-26 20:34 ` Bart Schaefer
0 siblings, 1 reply; 2+ messages in thread
From: Bart Schaefer @ 2021-04-26 20:19 UTC (permalink / raw)
To: Zsh hackers list
I haven't dug into this at all, but consider this:
% oops() { { zle .send-break } always { return 0 } }
% zle -N oops
% if true
if> then
(type ESC x oops RET at this point, then begin typing again at the new
PS1 prompt)
% if false
then if>
Note the parser thinks we're still waiting for the "then" to go with
the aborted "if". There's no way at this point to complete a
syntactically-valid "if" statement; the chain of unresolved "then"
just keeps getting deeper. Simple command lines work and are
executed as if at a normal PS1.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2021-04-26 20:34 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-04-26 20:19 BUG: "always" block with send-break confuses stdin parser Bart Schaefer
2021-04-26 20:34 ` Bart Schaefer
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).