zsh-users
 help / color / mirror / code / Atom feed
From: Bart Schaefer <schaefer@brasslantern.com>
To: Ray Andrews <rayandrews@eastlink.ca>
Cc: Zsh Users <zsh-users@zsh.org>
Subject: Re: command recall
Date: Sun, 7 Feb 2021 12:42:25 -0800	[thread overview]
Message-ID: <CAH+w=7bVDu3nYJWePYGqj1ajc8uqm36Eo5fOK5Svi=ZtaU1s8w@mail.gmail.com> (raw)
In-Reply-To: <8e1a7c38-1901-0085-88e4-96b3acc208be@eastlink.ca>

On Sun, Feb 7, 2021 at 10:10 AM Ray Andrews <rayandrews@eastlink.ca> wrote:
>
> ....
> accept-line
> history-beginning-search-backward
> ....
>
> would that work?

Not that, because accept-line effectively terminates the widget, so
history-beginning-search-backward is never reached.

The following might work; I don't use sharehistory so setting up a
test case is a bit more than I want to get into today:

shared-history-beginning-search-backward() {
   fc -RI
   zle .history-beginning-search-backward "$@"
}
zle -N history-beginning-search-backward \
  shared-history-beginning-search-backward


  reply	other threads:[~2021-02-07 20:43 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
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 [this message]
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=7bVDu3nYJWePYGqj1ajc8uqm36Eo5fOK5Svi=ZtaU1s8w@mail.gmail.com' \
    --to=schaefer@brasslantern.com \
    --cc=rayandrews@eastlink.ca \
    --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).