From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 12449 invoked from network); 18 Jun 2007 21:46:53 -0000 X-Spam-Checker-Version: SpamAssassin 3.2.1 (2007-05-02) on f.primenet.com.au X-Spam-Level: X-Spam-Status: No, score=-2.6 required=5.0 tests=BAYES_00 autolearn=ham version=3.2.1 Received: from news.dotsrc.org (HELO a.mx.sunsite.dk) (130.225.247.88) by ns1.primenet.com.au with SMTP; 18 Jun 2007 21:46:53 -0000 Received-SPF: none (ns1.primenet.com.au: domain at sunsite.dk does not designate permitted sender hosts) Received: (qmail 51235 invoked from network); 18 Jun 2007 21:46:47 -0000 Received: from sunsite.dk (130.225.247.90) by a.mx.sunsite.dk with SMTP; 18 Jun 2007 21:46:47 -0000 Received: (qmail 29010 invoked by alias); 18 Jun 2007 21:46:38 -0000 Mailing-List: contact zsh-users-help@sunsite.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 11589 Received: (qmail 29001 invoked from network); 18 Jun 2007 21:46:37 -0000 Received: from news.dotsrc.org (HELO a.mx.sunsite.dk) (130.225.247.88) by sunsite.dk with SMTP; 18 Jun 2007 21:46:37 -0000 Received: (qmail 49786 invoked from network); 18 Jun 2007 21:46:37 -0000 Received: from pepper.fruitcom.com (82.201.5.4) by a.mx.sunsite.dk with SMTP; 18 Jun 2007 21:46:34 -0000 Received: from localhost (localhost.localdomain [127.0.0.1]) by pepper.fruitcom.com (Postfix) with ESMTP id D9991C9420D for ; Mon, 18 Jun 2007 23:46:30 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at fruitcom.com Received: from send-to-amavis ([127.0.0.1]) by localhost (pepper.fruitcom.com [127.0.0.1]) (amavisd-new, port 10024) with SMTP id FFEvkZ04hiYE for ; Mon, 18 Jun 2007 23:46:14 +0200 (CEST) Received: by pepper.fruitcom.com (Postfix, from userid 1000) id 77C9AC9420E; Mon, 18 Jun 2007 23:46:14 +0200 (CEST) Date: Mon, 18 Jun 2007 23:46:14 +0200 From: Eric Smith To: Zsh Users Subject: Re: conditionally match part of file name to most recently modified file - take 2 Message-ID: <20070618214614.GA21852@fruitcom.com> References: <20070617211644.GA11636@fruitcom.com> <20070618110948.3d8d739f@news01.csr.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20070618110948.3d8d739f@news01.csr.com> User-Agent: Mutt/1.5.12-2006-07-14 Thanks Peter Let me increase verbosity to describe the desired functionality. I would like to have certain commands automatically run this function. This I currently do with the following: #compdef vim less sed perl ooffice ... Then I would like to type "ooffice foo" And the function would execute: ooffice foo if file foo existed, otherwise it would execute: ooffice *foo*(om[1]) I would like this to be as efficient as possible. Eric > On Sun, 17 Jun 2007 23:16:44 +0200 > > I want to be able to type > > "vim foo" > > in order to edit the last file whose name contains the string > > "foo". ...