From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 15479 invoked from network); 17 Aug 2002 08:51:33 -0000 Received: from sunsite.dk (130.225.247.90) by ns1.primenet.com.au with SMTP; 17 Aug 2002 08:51:33 -0000 Received: (qmail 17763 invoked by alias); 17 Aug 2002 08:51:19 -0000 Mailing-List: contact zsh-users-help@sunsite.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 5263 Received: (qmail 17750 invoked from network); 17 Aug 2002 08:51:18 -0000 Date: Sat, 17 Aug 2002 09:50:59 +0100 From: Darren Greaves To: zsh-users@sunsite.dk Subject: Re: history menu completion? Message-ID: <20020817095059.A27315@krapplets.org> References: Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5.1i In-Reply-To: ; from vts@veritas.uchicago.edu on Fri, Aug 16, 2002 at 06:51:57PM -0500 Hi, here is what I do to achieve what you want. I bound history-beginning-search-forward to F2 and history-beginning-search-backward to F3. Then, when I type a command that I want to recall from history, I simply type enough to match the history (usually just the command without any parameters) then press F2 or F3 to cycle through all the history matches for that command. Example. $ somecom matches $ somecommand -with -fancy /options/and/a/long/path but the cursor stays in place and you can press F2 again and it will match: $ somecommand -with -more -fancy /options/and/another/long/path and so on... I read about it a while back on this list and it has changed my life. :-) Darren. On Fri, Aug 16, 2002 at 06:51:57PM -0500, vts@veritas.uchicago.edu wrote: > > Here is a scenario: > > $ somecommand -with -fancy /options/and/a/long/path > $ somecommand -with -more -fancy /options/and/another/long/path > . > > Now, if I do: > > $ !somecom > > I'll get the following > > $ somecommand -with -more -fancy /options/and/another/long/path > > At this point, I would like to be able to hit again to get: > > $ somecommand -with -fancy /options/and/a/long/path > > the same way it works for ambiguous filename completion. Searches > have failed me: Is there a way to do this with zsh? > > If not, there should be! > > > -- Burns: Who was that young hellcat, Smithers? Smithers: Homer Simpson, sir. Burns: Simpson, eh? I'll remember that name... Darren Greaves - http://boncey.org/