Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: history-incremental-search-backward with a twist
- X-seq: zsh-users 4286
- From: Bart Schaefer <schaefer@xxxxxxxxxxxxxxxx>
- To: Hannu Koivisto <azure@xxxxxx>, zsh-users@xxxxxxxxxx
- Subject: Re: history-incremental-search-backward with a twist
- Date: Sat, 29 Sep 2001 01:41:05 +0000
- In-reply-to: <87pu8b3tjx.fsf@xxxxxxxxxxxxxxxx>
- Mailing-list: contact zsh-users-help@xxxxxxxxxx; run by ezmlm
- References: <87pu8b3tjx.fsf@xxxxxxxxxxxxxxxx>
On Sep 29, 12:16am, Hannu Koivisto wrote:
}
} What would I have to do if I wanted to have commands that work just
} like history-incremental-search-{forward,backward} but consider
} only history elements that start with what is written on the
} command line at the time of invocation of such a searching command?
Presuming you have 4.0.x, this is ridiculously easy ...
function beginning-incremental-search {
zle .${WIDGET/beginning/history} $LBUFFER
}
zle -N beginning-incremental-search-backward beginning-incremental-search
zle -N beginning-incremental-search-forward beginning-incremental-search
bindkey "^R" beginning-incremental-search-backward
--
Bart Schaefer Brass Lantern Enterprises
http://www.well.com/user/barts http://www.brasslantern.com
Zsh: http://www.zsh.org | PHPerl Project: http://phperl.sourceforge.net
Messages sorted by:
Reverse Date,
Date,
Thread,
Author