From: Bart Schaefer <schaefer@brasslantern.com>
To: dominik.vogt@gmx.de, Zsh Users <zsh-users@zsh.org>
Subject: Re: Enhanced history-incremental-search
Date: Tue, 16 Aug 2022 13:27:07 -0700 [thread overview]
Message-ID: <CAH+w=7YS+_4s+vZTCQYYJYP4iQLJ5S_-rx=g6fP+OioQjSnx8Q@mail.gmail.com> (raw)
In-Reply-To: <Yvt0RaIHRCcjWpgl@gmx.de>
On Tue, Aug 16, 2022 at 3:41 AM Dominik Vogt <dominik.vogt@gmx.de> wrote:
>
> I'd like to have a context sensitive kind of
> history-incremental-search-*.
history-beginning-incremental-search-backward () {
zle -U "^${LBUFFER}${BUFFER:+*}"
zle history-incremental-pattern-search-backward -K ipsearchback
}
zle -N history-beginning-incremental-search-backward
bindkey ^R history-beginning-incremental-search-backward
bindkey -A isearch ipsearchback
bindkey -M ipsearchback ^R history-incremental-search-backward
The "cycle" part is left as an exercise, because that's not supported
natively by the history-incremental-* widgets. The user-contributed
history-pattern-search and history-beginning-search-menu widgets may
also be helpful.
next prev parent reply other threads:[~2022-08-16 20:28 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-08-16 10:41 Dominik Vogt
2022-08-16 20:27 ` Bart Schaefer [this message]
2022-08-17 9:23 ` Dominik Vogt
2022-08-17 22:00 ` Zach Riggle
2022-08-17 22:54 ` Bart Schaefer
2022-08-19 1:36 ` Zach Riggle
2022-09-02 12:32 ` Vincent Lefevre
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=7YS+_4s+vZTCQYYJYP4iQLJ5S_-rx=g6fP+OioQjSnx8Q@mail.gmail.com' \
--to=schaefer@brasslantern.com \
--cc=dominik.vogt@gmx.de \
--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).