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