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

Re: Adding to the history from within a widget



On 3 Jan 2020, at 05:03, Piers Powlesland <pierspowlesland@xxxxxxxxx> wrote:
> If I execute another command in the shell I am then able to see the entry
> added with 'print -s' by pressing up twice.
>
> I'm wondering if you experience the same, possibly this has been fixed in
> newer versions of zsh?

It's the same in master. I'm not positive, but i don't think it's possible to
make new history entries actually selectable until the next prompt. You would
have to make your widget run `zle .accept-line` or `zle .send-break` (which
will cause whatever's currently on the line to be accepted or discarded,
respectively)

dana



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