From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 11459 invoked from network); 15 Jul 2006 16:22:57 -0000 X-Spam-Checker-Version: SpamAssassin 3.1.3 (2006-06-01) on f.primenet.com.au X-Spam-Level: X-Spam-Status: No, score=-2.2 required=5.0 tests=AWL,BAYES_00, FORGED_RCVD_HELO autolearn=ham version=3.1.3 Received: from news.dotsrc.org (HELO a.mx.sunsite.dk) (130.225.247.88) by ns1.primenet.com.au with SMTP; 15 Jul 2006 16:22:57 -0000 Received-SPF: none (ns1.primenet.com.au: domain at sunsite.dk does not designate permitted sender hosts) Received: (qmail 99414 invoked from network); 15 Jul 2006 16:22:51 -0000 Received: from sunsite.dk (130.225.247.90) by a.mx.sunsite.dk with SMTP; 15 Jul 2006 16:22:51 -0000 Received: (qmail 6670 invoked by alias); 15 Jul 2006 16:22:40 -0000 Mailing-List: contact zsh-users-help@sunsite.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 10518 Received: (qmail 6660 invoked from network); 15 Jul 2006 16:22:39 -0000 Received: from news.dotsrc.org (HELO a.mx.sunsite.dk) (130.225.247.88) by sunsite.dk with SMTP; 15 Jul 2006 16:22:39 -0000 Received: (qmail 97895 invoked from network); 15 Jul 2006 16:22:39 -0000 Received: from main.gmane.org (HELO ciao.gmane.org) (80.91.229.2) by a.mx.sunsite.dk with SMTP; 15 Jul 2006 16:22:38 -0000 Received: from list by ciao.gmane.org with local (Exim 4.43) id 1G1mua-0007yn-61 for zsh-users@sunsite.dk; Sat, 15 Jul 2006 18:22:36 +0200 Received: from 241.119-84-212.staticip.namesco.net ([212.84.119.241]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Sat, 15 Jul 2006 18:22:36 +0200 Received: from david by 241.119-84-212.staticip.namesco.net with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Sat, 15 Jul 2006 18:22:36 +0200 X-Injected-Via-Gmane: http://gmane.org/ To: zsh-users@sunsite.dk From: zzapper Subject: Re: Using Global aliases to make a "macro" shell Date: Sat, 15 Jul 2006 16:22:24 +0000 (UTC) Organization: SuccessTheory Message-ID: References: <237967ef0607150905v400bac6cl9dc9add48786074a@mail.gmail.com> X-Complaints-To: usenet@sea.gmane.org X-Gmane-NNTP-Posting-Host: 241.119-84-212.staticip.namesco.net User-Agent: Xnews/5.04.25 Sender: news "Mikael Magnusson" wrote in news:237967ef0607150905v400bac6cl9dc9add48786074a@mail.gmail.com: > On 7/15/06, zzapper wrote: >> Using Global aliases to make a "macro" shell >> > A related very useful keybind is > bindkey "^N" _most_recent_file > although it completes files and directories alike, despite the name. > Also very useful is > bindkey "^[^N" _most_accessed_file > Just copy _most_recent_file and apply > 17c17 > < eval "file=($PREFIX*$SUFFIX(om[${NUMERIC:-1}]N))" > --- >> eval "file=($PREFIX*$SUFFIX(oa[${NUMERIC:-1}]N))" > 21c21 > < eval "file=($PREFIX*$SUFFIX(om[${NUMERIC:-1}]N))" > --- >> eval "file=($PREFIX*$SUFFIX(oa[${NUMERIC:-1}]N))" > > PS why the ls invocations? this seems to work just as well > alias -g NF='*(.om[1])' > alias -g ND='*(/om[1])' > Thanks that's why I post these to see how to do it better! BTW I get _most_accessed_file widget not available (zsh 4.2.6) what Do I have to do activate it? zzapper -- http://successtheory.com/tips/ Vim, Zsh, MySQL Tips