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

Re: [PATCH] [ping] Effect of "print -s" when called in zle widget not seen until zle is restarted



On Sun, May 10, 2020 at 3:08 AM Stephane Chazelas <stephane@xxxxxxxxxxxx> wrote:
>
> [Repost as it looks like it was missed the first time round.]

I got it both times, FWIW.

> > function test_hist() {
> >     print -s "This is a test"
> > }
> >
> > If I call the function explicitly by typing test_hist, the
> > string is immediately added to the history, but if I call it
> > through the bindkey by pressing ctrl-x ctrl-t, the string is not
> > added to the history straight away. I need to issue another
> > command before I can see it in the history.
> >
> > Why is that, and how can I fix it?

I think that's actually intentional, and changing it might break
contributed functions such as zcalc, sticky-note, and nslookup.

There appears to be some interaction with "vared -h" that changes when
the ZLE_CMD_SET_HIST_LINE entry point is used.



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