From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 7390 invoked from network); 29 Sep 2001 01:41:32 -0000 Received: from sunsite.dk (130.225.51.30) by ns1.primenet.com.au with SMTP; 29 Sep 2001 01:41:32 -0000 Received: (qmail 5207 invoked by alias); 29 Sep 2001 01:41:21 -0000 Mailing-List: contact zsh-users-help@sunsite.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 4286 Received: (qmail 5194 invoked from network); 29 Sep 2001 01:41:20 -0000 From: Bart Schaefer Message-Id: <1010929014105.ZM18918@candle.brasslantern.com> Date: Sat, 29 Sep 2001 01:41:05 +0000 In-Reply-To: <87pu8b3tjx.fsf@lynx.ionific.com> Comments: In reply to Hannu Koivisto "history-incremental-search-backward with a twist" (Sep 29, 12:16am) References: <87pu8b3tjx.fsf@lynx.ionific.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, 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