Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: history-incremental-search-backward with a twist
- X-seq: zsh-users 4288
- 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 02:41:48 +0000
- In-reply-to: <1010929014105.ZM18918@xxxxxxxxxxxxxxxxxxxxxxx>
- Mailing-list: contact zsh-users-help@xxxxxxxxxx; run by ezmlm
- References: <87pu8b3tjx.fsf@xxxxxxxxxxxxxxxx> <1010929014105.ZM18918@xxxxxxxxxxxxxxxxxxxxxxx>
On Sep 29, 1:41am, Bart Schaefer wrote:
}
} Presuming you have 4.0.x, this is ridiculously easy ...
Except that I forgot about the silly problem with repeating the keystroke;
the "minibuffer" doesn't really have a "keymap", so you have to name the
widget the right thing. Like so:
function beginning-incremental-search {
if [[ $LASTWIDGET == $WIDGET ]]
then zle .$WIDGET
else zle .$WIDGET $LBUFFER
fi
}
zle -N history-incremental-search-backward beginning-incremental-search
zle -N history-incremental-search-forward beginning-incremental-search
Which means you can't use the old history-incremental-search-* any more if
you want this variant to work.
Note to zsh-workers: We really need to get real keymaps in there. It
shouldn't even be very difficult any more, at least in the -dev version.
--
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