zsh-users
 help / color / mirror / code / Atom feed
From: Bart Schaefer <schaefer@brasslantern.com>
To: "Lawrence Velázquez" <vq@larryv.me>
Cc: Ray Andrews <rayandrews@eastlink.ca>, Zsh Users <zsh-users@zsh.org>
Subject: Re: command recall
Date: Sat, 6 Feb 2021 14:08:30 -0800	[thread overview]
Message-ID: <CAH+w=7bTTVsBYMNpOhEFhuF7ZjEEGC_SwbXXnoceO-4ddxWL3g@mail.gmail.com> (raw)
In-Reply-To: <D9E5B717-0FE3-424D-A7E0-96E10DD77AD3@larryv.me>

On Sat, Feb 6, 2021 at 9:22 AM Lawrence Velázquez <vq@larryv.me> wrote:
>
> > On Feb 6, 2021, at 12:10 PM, Lawrence Velázquez <vq@larryv.me> wrote:
> >
> >> On Feb 6, 2021, at 11:36 AM, Ray Andrews <rayandrews@eastlink.ca> 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.


  reply	other threads:[~2021-02-06 22:09 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-02-06 16:36 Ray Andrews
2021-02-06 17:10 ` Lawrence Velázquez
2021-02-06 17:22   ` Lawrence Velázquez
2021-02-06 22:08     ` Bart Schaefer [this message]
2021-02-06 23:11       ` Ray Andrews
2021-02-07 16:56         ` Bart Schaefer
2021-02-07 18:09           ` Ray Andrews
2021-02-07 20:42             ` Bart Schaefer
2021-02-07 21:34               ` Ray Andrews
2021-02-07 19:12 ` Bart Schaefer

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CAH+w=7bTTVsBYMNpOhEFhuF7ZjEEGC_SwbXXnoceO-4ddxWL3g@mail.gmail.com' \
    --to=schaefer@brasslantern.com \
    --cc=rayandrews@eastlink.ca \
    --cc=vq@larryv.me \
    --cc=zsh-users@zsh.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/zsh/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).