From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 12183 invoked from network); 29 May 2006 08:18:47 -0000 X-Spam-Checker-Version: SpamAssassin 3.1.2 (2006-05-25) on f.primenet.com.au X-Spam-Level: X-Spam-Status: No, score=-2.5 required=5.0 tests=AWL,BAYES_00, FORGED_RCVD_HELO autolearn=ham version=3.1.2 Received: from news.dotsrc.org (HELO a.mx.sunsite.dk) (130.225.247.88) by ns1.primenet.com.au with SMTP; 29 May 2006 08:18:47 -0000 Received: (qmail 92659 invoked from network); 29 May 2006 08:18:40 -0000 Received: from sunsite.dk (130.225.247.90) by a.mx.sunsite.dk with SMTP; 29 May 2006 08:18:40 -0000 Received: (qmail 10549 invoked by alias); 29 May 2006 08:18:33 -0000 Mailing-List: contact zsh-users-help@sunsite.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 10340 Received: (qmail 10536 invoked from network); 29 May 2006 08:18:32 -0000 Received: from news.dotsrc.org (HELO a.mx.sunsite.dk) (130.225.247.88) by sunsite.dk with SMTP; 29 May 2006 08:18:32 -0000 Received: (qmail 91552 invoked from network); 29 May 2006 08:18:32 -0000 Received: from mailhost.u-strasbg.fr (130.79.200.156) by a.mx.sunsite.dk with SMTP; 29 May 2006 08:18:31 -0000 Received: from baal.u-strasbg.fr (baal.u-strasbg.fr [IPv6:2001:660:2402::41]) by mailhost.u-strasbg.fr (8.13.6/jtpda-5.5pre1) with ESMTP id k4T8IUj4048128 for ; Mon, 29 May 2006 10:18:30 +0200 (CEST) Received: from xpeerience.u-strasbg.fr (xpeerience.u-strasbg.fr [130.79.188.35]) by baal.u-strasbg.fr (8.13.6/jtpda-5.5pre1) with ESMTP id k4T8IUif054840 for ; Mon, 29 May 2006 10:18:30 +0200 (CEST) Received: by xpeerience.u-strasbg.fr (Postfix, from userid 1000) id 01B57D2C21; Mon, 29 May 2006 10:19:03 +0200 (CEST) Date: Mon, 29 May 2006 10:19:03 +0200 From: Marc Chantreux To: zsh-users Subject: Re: zsh best practices ? Message-ID: <20060529081903.GA26234@ulpmm.u-strasbg.fr> Mail-Followup-To: zsh-users References: <20060526084922.GA21991@ulpmm.u-strasbg.fr> <060526084954.ZM19149@torch.brasslantern.com> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-15 Content-Disposition: inline In-Reply-To: <060526084954.ZM19149@torch.brasslantern.com> User-Agent: Mutt/1.5.11+cvs20060403 Content-Transfer-Encoding: quoted-printable X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-2.0.2 (mailhost.u-strasbg.fr [IPv6:2001:660:2402::156]); Mon, 29 May 2006 10:18:30 +0200 (CEST) X-Virus-Scanned: ClamAV 0.88.2/1495/Mon May 29 09:10:34 2006 on mr6.u-strasbg.fr X-Virus-Status: Clean Hi Bart, Thanks for answer. le 26/05/2006, Bart Schaefer nous =E9crivait : > We should add something to Etc/zsh-development-guide discussing the > conventions for naming completion functions, widgets, etc. that go > into the distribution; I don't see anything in there about that. hope it will come soon. > It's a little more difficult with zsh than with perl because "private" > functions are still usually something you type on the command line, > not hidden in a libarary somewhere. It's almost like asking if there > is a naming convention for files in the directories in $PATH. The > completion system is a major exception to this. i know the difficulty of that and thought that long time zsh scripters had already shared their tips. > One convention is to stick a "z" in front of anything that replaces a > similarly-named external command, but that doesn't help where the dist > has already adopted it. > I sometimes use *two* leading underscores, but only if I'm really worri= ed > about a name collision. thinking about it, i've decided to mix both : "private" functions will be prefixed by z__ and local vars will be prefixed by the name of their function. For exemple: function z__association_compare variable z__association_compare_current_key=20 Thanks for clues and regards, mc