Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: Enhanced history-incremental-search
- X-seq: zsh-users 27961
- From: Dominik Vogt <dominik.vogt@xxxxxx>
- To: Zsh Users <zsh-users@xxxxxxx>
- Subject: Re: Enhanced history-incremental-search
- Date: Wed, 17 Aug 2022 10:23:52 +0100
- Archived-at: <https://zsh.org/users/27961>
- In-reply-to: <CAH+w=7YS+_4s+vZTCQYYJYP4iQLJ5S_-rx=g6fP+OioQjSnx8Q@mail.gmail.com>
- List-id: <zsh-users.zsh.org>
- Mail-followup-to: Zsh Users <zsh-users@xxxxxxx>
- References: <Yvt0RaIHRCcjWpgl@gmx.de> <CAH+w=7YS+_4s+vZTCQYYJYP4iQLJ5S_-rx=g6fP+OioQjSnx8Q@mail.gmail.com>
- Reply-to: dominik.vogt@xxxxxx
On Tue, Aug 16, 2022 at 01:27:07PM -0700, Bart Schaefer wrote:
> On Tue, Aug 16, 2022 at 3:41 AM Dominik Vogt <dominik.vogt@xxxxxx> 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
Thanks a lot, that works fine!
> The "cycle" part is left as an exercise, because that's not supported
> natively by the history-incremental-* widgets.
That was only bad choice of words. In a history with two million
lines it is pointless to search in cycles.
Ciao
Dominik ^_^ ^_^
--
Dominik Vogt
Messages sorted by:
Reverse Date,
Date,
Thread,
Author