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

Re: The curious incident of the feep in the night-time

On Wed, Apr 28, 2021 at 12:26 AM Stephane Chazelas
<stephane@xxxxxxxxxxxx> wrote:
> That reminds me of
> https://www.zsh.org/mla/workers/2020/msg00229.html
> (X-seq: zsh-workers 45404)

Following that back to
> ... using a different [errflag] bit ... we could abort back to
> the top of ZLE rather than out of ZLE and back in again

That idea is actually impossible because of the aforementioned
handshake with the parser.  Unwinding the recursive-descent parse
requires leaving and re-entering ZLE.

> which would
> mean you finally had the ability to embed push-line in other widgets

(This means "push-input", push-line actually already can be embedded
because it doesn't reset the prebuffer.)

I think the best we can do without completely restructuring the
interactive shell input** is to avoid treating push-input /
push-line-or-edit as an error condition, which might make it possible
to fix the "vared kills the shell" problem from workers/45404.

** Roughly, we'd have to invert the entry chain so that ZLE drives the
parser instead of the other way around, and change accept-line so that
it doesn't leave ZLE at all until the parser says it has a complete
expression, with attendant changes to managing PREBUFFER and BUFFER
and the printing (or not) of PS2, etc.  That in turn means that
interactive input is handled a lot differently from script input,
whereas right now those differences are all restricted to the I/O

Messages sorted by: Reverse Date, Date, Thread, Author