Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
BUG: "always" block with send-break confuses stdin parser
- X-seq: zsh-workers 48720
- From: Bart Schaefer <schaefer@xxxxxxxxxxxxxxxx>
- To: Zsh hackers list <zsh-workers@xxxxxxx>
- Subject: BUG: "always" block with send-break confuses stdin parser
- Date: Mon, 26 Apr 2021 13:19:41 -0700
- Archived-at: <https://zsh.org/workers/48720>
- List-id: <zsh-workers.zsh.org>
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.
Messages sorted by:
Reverse Date,
Date,
Thread,
Author