From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 2257 invoked from network); 26 May 2006 15:50:18 -0000 X-Spam-Checker-Version: SpamAssassin 3.1.1 (2006-03-10) 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.1 Received: from news.dotsrc.org (HELO a.mx.sunsite.dk) (130.225.247.88) by ns1.primenet.com.au with SMTP; 26 May 2006 15:50:18 -0000 Received: (qmail 65036 invoked from network); 26 May 2006 15:50:09 -0000 Received: from sunsite.dk (130.225.247.90) by a.mx.sunsite.dk with SMTP; 26 May 2006 15:50:09 -0000 Received: (qmail 2039 invoked by alias); 26 May 2006 15:50:02 -0000 Mailing-List: contact zsh-users-help@sunsite.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 10315 Received: (qmail 2020 invoked from network); 26 May 2006 15:50:01 -0000 Received: from news.dotsrc.org (HELO a.mx.sunsite.dk) (130.225.247.88) by sunsite.dk with SMTP; 26 May 2006 15:50:01 -0000 Received: (qmail 63858 invoked from network); 26 May 2006 15:50:01 -0000 Received: from vms042pub.verizon.net (206.46.252.42) by a.mx.sunsite.dk with SMTP; 26 May 2006 15:49:58 -0000 Received: from torch.brasslantern.com ([71.116.105.50]) by vms042.mailsrvcs.net (Sun Java System Messaging Server 6.2-4.02 (built Sep 9 2005)) with ESMTPA id <0IZV0018BQN8S9F0@vms042.mailsrvcs.net> for zsh-users@sunsite.dk; Fri, 26 May 2006 10:49:57 -0500 (CDT) Received: from torch.brasslantern.com (localhost.localdomain [127.0.0.1]) by torch.brasslantern.com (8.13.1/8.13.1) with ESMTP id k4QFnsSJ019151 for ; Fri, 26 May 2006 08:49:55 -0700 Received: (from schaefer@localhost) by torch.brasslantern.com (8.13.1/8.13.1/Submit) id k4QFnsxQ019150 for zsh-users@sunsite.dk; Fri, 26 May 2006 08:49:54 -0700 Date: Fri, 26 May 2006 08:49:54 -0700 From: Bart Schaefer Subject: Re: zsh best practices ? In-reply-to: <20060526084922.GA21991@ulpmm.u-strasbg.fr> To: zsh-users Message-id: <060526084954.ZM19149@torch.brasslantern.com> MIME-version: 1.0 X-Mailer: OpenZMail Classic (0.9.2 24April2005) Content-type: text/plain; charset=us-ascii References: <20060526084922.GA21991@ulpmm.u-strasbg.fr> Comments: In reply to Marc Chantreux "zsh best practices ?" (May 26, 10:49am) On May 26, 10:49am, Marc Chantreux wrote: } } is there a document about zsh coding style and best practices? Not really. 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. } i want to adopt a convention for private functions and variables. } Perl coders are using names beginning with _ but this is used for } completion functions in zsh. } } Is there another convention adopted? 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. 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 worried about a name collision.