From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 28020 invoked from network); 21 Feb 2004 02:08:18 -0000 Received: from sunsite.dk (130.225.247.90) by ns1.primenet.com.au with SMTP; 21 Feb 2004 02:08:18 -0000 Received: (qmail 24888 invoked by alias); 21 Feb 2004 02:08:04 -0000 Mailing-List: contact zsh-users-help@sunsite.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 7074 Received: (qmail 24877 invoked from network); 21 Feb 2004 02:08:03 -0000 Received: from localhost (HELO sunsite.dk) (127.0.0.1) by localhost with SMTP; 21 Feb 2004 02:08:03 -0000 X-MessageWall-Score: 0 (sunsite.dk) Received: from [207.71.22.205] by sunsite.dk (MessageWall 1.0.8) with SMTP; 21 Feb 2004 2:7:58 -0000 Received: from elm.teratorn.org (unknown [10.0.0.23]) by oak.teratorn.org (Postfix) with ESMTP id B211549B; Fri, 20 Feb 2004 20:36:35 -0600 (CST) To: Thorsten Kampe , zsh-users@sunsite.dk Subject: Re: incremental history search References: <1lk8q9de9jvbv.dlg@thorstenkampe.de> Message-ID: From: Eric Mangold Content-Type: text/plain; format=flowed; charset=iso-8859-1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Date: Fri, 20 Feb 2004 20:07:33 -0700 In-Reply-To: User-Agent: Opera7.23/Linux M2 build 518 On Sat, 21 Feb 2004 02:35:14 +0100, Thorsten Kampe wrote: > * Eric Mangold (2004-02-21 02:17 +0100) >> On Sat, 21 Feb 2004 00:04:00 +0100, Thorsten Kampe >> wrote: >>> I have bound[1] the cursor keys to "up-line-or-search" and >>> down-line-or-search. Unfortunately this only completes the first word >>> of the search; meaning when I type >>> >>> wget http://foo.com >>> wget ftp://bar.com >>> >>> and then... >>> wget http[up cursor] >>> ...it completes to "wget ftp://bar.com" and not to the desired "wget >>> http://foo.com". It only searches matches for the first word ("wget") >>> of the already typed command line in history. >>> >>> Is it possible to make zsh search for matches of the whole command >>> line ("wget http") - and not only the first word? >> >> Yes. I use the following bindings for that. >> >> bindkey '\M-p' history-beginning-search-backward >> bindkey '\M-n' history-beginning-search-forward > > Aah, seems like exactly what I want. Are there any functional > disadvantages compared to "up-line-or-search"/"down-line-or-search" > (because it seems to me as "history-beginning-search-backward" is a > superset of "up-line-or-search")? I can't think of any disadvantages, but the authoritative place to look is chapter 17.6.2 @ http://zsh.sunsite.dk/Doc/Release/zsh_17.html -Eric