From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 7698 invoked from network); 29 Sep 2001 02:42:11 -0000 Received: from sunsite.dk (130.225.51.30) by ns1.primenet.com.au with SMTP; 29 Sep 2001 02:42:11 -0000 Received: (qmail 15314 invoked by alias); 29 Sep 2001 02:41:57 -0000 Mailing-List: contact zsh-users-help@sunsite.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 4288 Received: (qmail 15302 invoked from network); 29 Sep 2001 02:41:56 -0000 From: Bart Schaefer Message-Id: <1010929024149.ZM19026@candle.brasslantern.com> Date: Sat, 29 Sep 2001 02:41:48 +0000 In-Reply-To: <1010929014105.ZM18918@candle.brasslantern.com> Comments: In reply to Bart Schaefer "Re: history-incremental-search-backward with a twist" (Sep 29, 1:41am) References: <87pu8b3tjx.fsf@lynx.ionific.com> <1010929014105.ZM18918@candle.brasslantern.com> X-Mailer: Z-Mail (5.0.0 30July97) To: Hannu Koivisto , zsh-users@sunsite.dk Subject: Re: history-incremental-search-backward with a twist MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii 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