zsh-workers
 help / color / mirror / Atom feed
* 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

* Re: BUG: "always" block with send-break confuses stdin parser
  2021-04-26 20:19 BUG: "always" block with send-break confuses stdin parser Bart Schaefer
@ 2021-04-26 20:34 ` Bart Schaefer
  0 siblings, 0 replies; 2+ messages in thread
From: Bart Schaefer @ 2021-04-26 20:34 UTC (permalink / raw)
  To: Zsh hackers list

Please disregard this.  I discovered I had an old patch popped off my
git stash that was changing parser behavior.


^ 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

zsh-workers

This inbox may be cloned and mirrored by anyone:

	git clone --mirror http://inbox.vuxu.org/zsh-workers

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V1 zsh-workers zsh-workers/ http://inbox.vuxu.org/zsh-workers \
		zsh-workers@zsh.org
	public-inbox-index zsh-workers

Example config snippet for mirrors.
Newsgroup available over NNTP:
	nntp://inbox.vuxu.org/vuxu.archive.zsh.workers


code repositories for the project(s) associated with this inbox:

	https://git.vuxu.org/mirror/zsh/

AGPL code for this site: git clone https://public-inbox.org/public-inbox.git