Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: The curious incident of the feep in the night-time
- X-seq: zsh-workers 48772
- From: Bart Schaefer <schaefer@xxxxxxxxxxxxxxxx>
- To: Zsh hackers list <zsh-workers@xxxxxxx>
- Subject: Re: The curious incident of the feep in the night-time
- Date: Sun, 2 May 2021 15:20:35 -0700
- Archived-at: <https://zsh.org/workers/48772>
- In-reply-to: <CAH+w=7baQBZh1Dfse1pC0GZSdqoEesJfVrCVHFKZqs5v1po4rA@mail.gmail.com>
- List-id: <zsh-workers.zsh.org>
- References: <CAH+w=7aadRw01MvNZjvgF=eNGJBO-+pUKmcA8meS83M96ysNfA@mail.gmail.com> <CAH+w=7a6=CaeP0LRN_a+ELjD6Fg3riS+hcXLHfSd9ZHhv=BphQ@mail.gmail.com> <CAH+w=7baQBZh1Dfse1pC0GZSdqoEesJfVrCVHFKZqs5v1po4rA@mail.gmail.com>
On Thu, Apr 29, 2021 at 11:27 AM Bart Schaefer
<schaefer@xxxxxxxxxxxxxxxx> wrote:
>
> An actual interrupt signal causes getbyte() to behave as if no
> keystroke were entered [...], sendbreak() eventually returns
> whatever keystroke(s) initiated the widget
More accurately, on sendbreak() the keystrokes have already been
returned, and used to select the widget.
This brings us to the final (I hope) complication, which is that when
a built-in widget is run by execzlefunc() any result stored in lastval
is retained, whereas invoking a user-defined widget passes noreturnval
= 1 to doshfunc() which causes lastval to be overwritten by the saved
value from before the function was invoked. This spoils a scheme I
briefly considered wherein running
zle send-break 75
(for example) would cause $? to be set to 75. I suppose it's best to
drop that idea and leave noreturnval as it is, because as it happens
there are no builtin widgets that change lastval.
A question for anyone still following this: Is it acceptable/desirable that
{ zle send-break } always {
TRY_BLOCK_ERROR=0
TRY_BLOCK_INTERRUPT=0
}
causes the send-break to be disregarded? Or should send-break in fact
have its own not-clearable state?
Messages sorted by:
Reverse Date,
Date,
Thread,
Author