From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 1315 invoked from network); 21 Oct 2005 03:20:29 -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 03:20:29 -0000 Received: (qmail 62890 invoked from network); 21 Oct 2005 03:20:23 -0000 Received: from sunsite.dk (130.225.247.90) by a.mx.sunsite.dk with SMTP; 21 Oct 2005 03:20:23 -0000 Received: (qmail 10791 invoked by alias); 21 Oct 2005 03:20:12 -0000 Mailing-List: contact zsh-users-help@sunsite.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 9536 Received: (qmail 10780 invoked from network); 21 Oct 2005 03:20:12 -0000 Received: from news.dotsrc.org (HELO a.mx.sunsite.dk) (130.225.247.88) by sunsite.dk with SMTP; 21 Oct 2005 03:20:12 -0000 Received: (qmail 61606 invoked from network); 21 Oct 2005 03:20:12 -0000 Received: from flock1.newmail.ru (212.48.140.157) by a.mx.sunsite.dk with SMTP; 21 Oct 2005 03:20:10 -0000 Received: (qmail 7866 invoked from network); 20 Oct 2005 16:00:07 -0000 Received: from unknown (HELO cooker.home.net) (arvidjaar@newmail.ru@83.237.208.168) by smtpd.newmail.ru with SMTP; 20 Oct 2005 16:00:07 -0000 From: Andrey Borzenkov To: zsh-users@sunsite.dk Subject: Re: duplicating functions Date: Thu, 20 Oct 2005 20:13:20 +0400 User-Agent: KMail/1.8.2 Cc: zzapper References: In-Reply-To: MIME-Version: 1.0 Content-Type: multipart/signed; boundary="nextPart1913025.VBakjGZQEO"; protocol="application/pgp-signature"; micalg=pgp-sha1 Content-Transfer-Encoding: 7bit Message-Id: <200510202013.20744.arvidjaar@newmail.ru> X-Spam-Checker-Version: SpamAssassin 3.0.4 (2005-06-05) on f.primenet.com.au X-Spam-Level: X-Spam-Status: No, score=-2.6 required=5.0 tests=AWL,BAYES_00 autolearn=ham version=3.0.4 --nextPart1913025.VBakjGZQEO Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Content-Disposition: inline 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 ..."=20 directly =2Dandrey --nextPart1913025.VBakjGZQEO Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.2 (GNU/Linux) iD8DBQBDV8IgR6LMutpd94wRAk4oAJ4h63ikUUceA1pxk4/N/fMvGWMGZQCfWI9G nJ/ZAnGAXFaWwj7XHvrKQ3c= =kvGc -----END PGP SIGNATURE----- --nextPart1913025.VBakjGZQEO--