From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 26913 invoked from network); 15 Jul 2006 19:46:29 -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=-1.4 required=5.0 tests=AWL,BAYES_00, FORGED_RCVD_HELO,RCVD_IN_BL_SPAMCOP_NET autolearn=no 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 19:46:29 -0000 Received-SPF: none (ns1.primenet.com.au: domain at sunsite.dk does not designate permitted sender hosts) Received: (qmail 43510 invoked from network); 15 Jul 2006 19:46:21 -0000 Received: from sunsite.dk (130.225.247.90) by a.mx.sunsite.dk with SMTP; 15 Jul 2006 19:46:21 -0000 Received: (qmail 21108 invoked by alias); 15 Jul 2006 19:46:15 -0000 Mailing-List: contact zsh-users-help@sunsite.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 10519 Received: (qmail 21098 invoked from network); 15 Jul 2006 19:46:14 -0000 Received: from news.dotsrc.org (HELO a.mx.sunsite.dk) (130.225.247.88) by sunsite.dk with SMTP; 15 Jul 2006 19:46:14 -0000 Received: (qmail 42474 invoked from network); 15 Jul 2006 19:46:14 -0000 Received: from ug-out-1314.google.com (66.249.92.175) by a.mx.sunsite.dk with SMTP; 15 Jul 2006 19:46:13 -0000 Received: by ug-out-1314.google.com with SMTP id c2so1242237ugf for ; Sat, 15 Jul 2006 12:46:13 -0700 (PDT) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=LJeCCLg0wpKyrafUuYIY0B3/dmQ1Ah8gvyRpRzbWp1hYtTr1IAFgpW7rKwYyA/x73Ux3TIAnSHh1Yu8vuXa2NqeLSlaPrIjeLSY6Ebgv64bnsrRNAE7BbLTHKki64z3fYOqJQcIejtB7hPU2iEN+0Duh9Uaz92+mjYg52c+s4xE= Received: by 10.66.243.2 with SMTP id q2mr1029935ugh; Sat, 15 Jul 2006 12:46:13 -0700 (PDT) Received: by 10.66.222.13 with HTTP; Sat, 15 Jul 2006 12:46:12 -0700 (PDT) Message-ID: <237967ef0607151246w6e5dd938pe580adcd67eaa553@mail.gmail.com> Date: Sat, 15 Jul 2006 21:46:12 +0200 From: "Mikael Magnusson" To: zzapper Subject: Re: Using Global aliases to make a "macro" shell Cc: zsh-users@sunsite.dk In-Reply-To: MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <237967ef0607150905v400bac6cl9dc9add48786074a@mail.gmail.com> On 7/15/06, zzapper wrote: > "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? Yeah, you have to do what i wrote you have to do :). It's a widget i created by copying and modifying _most_recent_file. -- Mikael Magnusson