From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 3742 invoked from network); 21 Oct 2005 08:39:50 -0000 Received: from news.dotsrc.org (HELO a.mx.sunsite.dk) (130.225.247.88) by ns1.primenet.com.au with SMTP; 21 Oct 2005 08:39:50 -0000 Received: (qmail 71915 invoked from network); 21 Oct 2005 08:39:37 -0000 Received: from sunsite.dk (130.225.247.90) by a.mx.sunsite.dk with SMTP; 21 Oct 2005 08:39:37 -0000 Received: (qmail 11643 invoked by alias); 21 Oct 2005 08:39:28 -0000 Mailing-List: contact zsh-users-help@sunsite.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 9537 Received: (qmail 11633 invoked from network); 21 Oct 2005 08:39:27 -0000 Received: from news.dotsrc.org (HELO a.mx.sunsite.dk) (130.225.247.88) by sunsite.dk with SMTP; 21 Oct 2005 08:39:27 -0000 Received: (qmail 70794 invoked from network); 21 Oct 2005 08:39:27 -0000 Received: from main.gmane.org (HELO ciao.gmane.org) (80.91.229.2) by a.mx.sunsite.dk with SMTP; 21 Oct 2005 08:39:26 -0000 Received: from list by ciao.gmane.org with local (Exim 4.43) id 1ESsNG-0001nU-Me for zsh-users@sunsite.dk; Fri, 21 Oct 2005 10:35:38 +0200 Received: from 212.84.119.241 ([212.84.119.241]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Fri, 21 Oct 2005 10:35:38 +0200 Received: from david by 212.84.119.241 with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Fri, 21 Oct 2005 10:35:38 +0200 X-Injected-Via-Gmane: http://gmane.org/ To: zsh-users@sunsite.dk From: zzapper Subject: Re: duplicating functions Date: Fri, 21 Oct 2005 09:35:08 +0100 Message-ID: References: <200510202013.20744.arvidjaar@newmail.ru> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Complaints-To: usenet@sea.gmane.org X-Gmane-NNTP-Posting-Host: 212.84.119.241 X-Newsreader: Forte Free Agent 2.0/32.652 Sender: news X-Spam-Checker-Version: SpamAssassin 3.0.4 (2005-06-05) on f.primenet.com.au X-Spam-Level: X-Spam-Status: No, score=-1.5 required=5.0 tests=AWL,BAYES_00,RCVD_BY_IP, RCVD_NUMERIC_HELO autolearn=no version=3.0.4 On Thu, 20 Oct 2005 20:13:20 +0400, wrote: >On Thursday 20 October 2005 13:35, zzapper wrote: >> Hi, >> I have a series of functions defined .zshenv >> >> function g0() { gmark $0 $* } >> function g1() { gmark $0 $* } >> function g2() { gmark $0 $* } >> function g3() { gmark $0 $* } >> function g4() { gmark $0 $* } >> function g5() { gmark $0 $* } >> function g6() { gmark $0 $* } >> function g7() { gmark $0 $* } >> function g8() { gmark $0 $* } >> function g9() { gmark $0 $* } >> >> Where gmark contains the code and $0 is used to determine which original >> function was called >> >> Is there are simpler way of doing this > >function g{0..9} { gmark $0 $* } > >but I still do not understand what's wrong with calling "gmark gN ..." >directly > >-andrey Andrey, Because I'm obsessed with typing the minimum numbers of characters like many *nixers -- zzapper Success for Techies and Vim,Zsh tips http://SuccessTheory.com/