From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 6450 invoked from network); 30 Jun 2004 13:41:19 -0000 Received: from odin.dotsrc.org (HELO a.mx.sunsite.dk) (130.225.247.85) by ns1.primenet.com.au with SMTP; 30 Jun 2004 13:41:19 -0000 Received: (qmail 14048 invoked from network); 30 Jun 2004 14:52:25 -0000 Received: from sunsite.dk (130.225.247.90) by a.mx.sunsite.dk with SMTP; 30 Jun 2004 14:52:25 -0000 Received: (qmail 4801 invoked by alias); 30 Jun 2004 13:40:39 -0000 Mailing-List: contact zsh-users-help@sunsite.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 7630 Received: (qmail 4791 invoked from network); 30 Jun 2004 13:40:39 -0000 Received: from odin.dotsrc.org (HELO a.mx.sunsite.dk) (qmailr@130.225.247.85) by sunsite.dk with SMTP; 30 Jun 2004 13:40:39 -0000 Received: (qmail 12917 invoked from network); 30 Jun 2004 14:51:57 -0000 Received: from main.gmane.org (80.91.224.249) by a.mx.sunsite.dk with SMTP; 30 Jun 2004 14:51:49 -0000 Received: from root by main.gmane.org with local (Exim 3.35 #1 (Debian)) id 1BffKA-00045q-00 for ; Wed, 30 Jun 2004 15:40:30 +0200 Received: from 139.4.37.213 ([139.4.37.213]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Wed, 30 Jun 2004 15:40:29 +0200 Received: from kai by 139.4.37.213 with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Wed, 30 Jun 2004 15:40:29 +0200 X-Injected-Via-Gmane: http://gmane.org/ To: zsh-users@sunsite.dk From: Kai Grossjohann Subject: filename cycling according to age, not name Date: Wed, 30 Jun 2004 15:38:40 +0200 Message-ID: <86isd9xj1b.fsf@rumba.de.uu.net> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Complaints-To: usenet@sea.gmane.org X-Gmane-NNTP-Posting-Host: 139.4.37.213 User-Agent: Gnus/5.110003 (No Gnus v0.3) Emacs/21.3.50 (gnu/linux) Cancel-Lock: sha1:b7YFuyMFVq++dKtYwJCv31wQslg= Sender: news X-Spam-Checker-Version: SpamAssassin 2.63 on a.mx.sunsite.dk X-Spam-Level: X-Spam-Status: No, hits=-0.0 required=6.0 tests=BAYES_44 autolearn=no version=2.63 X-Spam-Hits: -0.0 Normally, I'm happy with the normal filename completion behavior of zsh. (After I've customized it to my liking.) But from time to time, I would like to say "give me the newest file under the foo directory". Is there a way to do this? The ideal would be that I enter a partial filename (say "foo/") and then hit a key, and it inserts the newest file in that directory ("foo/x"), and then I hit the key again and it replaces the filename with the second-youngest ("foo/a"). Right now, the TAB key does something similar, but it sorts by filename, not by age. Right now, I have a function which does { ls -lt "$@" | head -15; } and then I copy and paste, but I'm sure it can be done in a more convenient manner. Kai