Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: Enhanced history-incremental-search
- X-seq: zsh-users 27960
- From: Bart Schaefer <schaefer@xxxxxxxxxxxxxxxx>
- To: dominik.vogt@xxxxxx, Zsh Users <zsh-users@xxxxxxx>
- Subject: Re: Enhanced history-incremental-search
- Date: Tue, 16 Aug 2022 13:27:07 -0700
- Archived-at: <https://zsh.org/users/27960>
- In-reply-to: <Yvt0RaIHRCcjWpgl@gmx.de>
- List-id: <zsh-users.zsh.org>
- References: <Yvt0RaIHRCcjWpgl@gmx.de>
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
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.
Messages sorted by:
Reverse Date,
Date,
Thread,
Author