From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 29973 invoked from network); 21 Oct 2005 03:12:51 -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:12:51 -0000 Received: (qmail 52812 invoked from network); 21 Oct 2005 03:12:45 -0000 Received: from sunsite.dk (130.225.247.90) by a.mx.sunsite.dk with SMTP; 21 Oct 2005 03:12:45 -0000 Received: (qmail 8434 invoked by alias); 21 Oct 2005 03:12:36 -0000 Mailing-List: contact zsh-users-help@sunsite.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 9535 Received: (qmail 8425 invoked from network); 21 Oct 2005 03:12:36 -0000 Received: from news.dotsrc.org (HELO a.mx.sunsite.dk) (130.225.247.88) by sunsite.dk with SMTP; 21 Oct 2005 03:12:36 -0000 Received: (qmail 51747 invoked from network); 21 Oct 2005 03:12:36 -0000 Received: from vms040pub.verizon.net (206.46.252.40) by a.mx.sunsite.dk with SMTP; 21 Oct 2005 03:12:34 -0000 Received: from candle.brasslantern.com ([71.116.81.225]) by vms040.mailsrvcs.net (Sun Java System Messaging Server 6.2 HotFix 0.04 (built Dec 24 2004)) with ESMTPA id <0ION00EOJXRB4O30@vms040.mailsrvcs.net> for zsh-users@sunsite.dk; Thu, 20 Oct 2005 09:33:12 -0500 (CDT) Received: from candle.brasslantern.com (IDENT:schaefer@localhost [127.0.0.1]) by candle.brasslantern.com (8.12.11/8.12.11) with ESMTP id j9KEXAir002584 for ; Thu, 20 Oct 2005 07:33:10 -0700 Received: (from schaefer@localhost) by candle.brasslantern.com (8.12.11/8.12.11/Submit) id j9KEX9wK002583 for zsh-users@sunsite.dk; Thu, 20 Oct 2005 07:33:09 -0700 Date: Thu, 20 Oct 2005 14:33:09 +0000 From: Bart Schaefer Subject: Re: duplicating functions In-reply-to: To: zsh-users@sunsite.dk Message-id: <1051020143309.ZM2582@candle.brasslantern.com> MIME-version: 1.0 X-Mailer: Z-Mail (5.0.0 30July97) Content-type: text/plain; charset=us-ascii References: Comments: In reply to zzapper "duplicating functions" (Oct 20, 10:35am) 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 You can define multiple function names having the same function body with a single "function" command (or with a single pair of empty parens, if you're using the other syntax). This is one of the reasons that the alias/function conflict is so insidious; if you have alias foo='noglob bar' foo() { print oops } you get two functions that print oops, one of which supercedes the noglob modifier, and neither of which is named foo. However, in a case like yours, that quirk is potentially useful: function g{0..9} { gmark $0 $* }