Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

BUG: "always" block with send-break confuses stdin parser



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