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

Re: command recall



On Sat, Feb 6, 2021 at 9:22 AM Lawrence Velázquez <vq@xxxxxxxxx> wrote:
>
> > On Feb 6, 2021, at 12:10 PM, Lawrence Velázquez <vq@xxxxxxxxx> wrote:
> >
> >> On Feb 6, 2021, at 11:36 AM, Ray Andrews <rayandrews@xxxxxxxxxxx> wrote:
> >>
> >> ... set and my up arrow is:
> >> bindkey "\e[A" history-beginning-search-backward
>
> I suppose you could write your own widget that updates the internal
> history first. Someone else would have to provide guidance on that.

The issue here is that when sitting at a prompt, zsh is (usually)
doing literally nothing.  It can't discover that the history file has
changed until you unblock it by doing something, and it doesn't update
the shared history until the current local history is ready to be
written.

You might be able to write a zle -F handler that interrupts ZLE if the
history file changes, causing the changed lines to be read (and a new
prompt printed).  If that works, the next issue would be preventing
terminal A from scrolling every time you do something in terminal B.




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