From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 23533 invoked from network); 19 Jun 2006 13:07:36 -0000 X-Spam-Checker-Version: SpamAssassin 3.1.3 (2006-06-01) on f.primenet.com.au X-Spam-Level: X-Spam-Status: No, score=-2.5 required=5.0 tests=BAYES_00,FORGED_RCVD_HELO autolearn=ham version=3.1.3 Received: from news.dotsrc.org (HELO a.mx.sunsite.dk) (130.225.247.88) by ns1.primenet.com.au with SMTP; 19 Jun 2006 13:07:36 -0000 Received-SPF: none (ns1.primenet.com.au: domain at sunsite.dk does not designate permitted sender hosts) Received: (qmail 8019 invoked from network); 19 Jun 2006 13:07:29 -0000 Received: from sunsite.dk (130.225.247.90) by a.mx.sunsite.dk with SMTP; 19 Jun 2006 13:07:28 -0000 Received: (qmail 18265 invoked by alias); 19 Jun 2006 13:07:20 -0000 Mailing-List: contact zsh-users-help@sunsite.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 10393 Received: (qmail 18255 invoked from network); 19 Jun 2006 13:07:19 -0000 Received: from news.dotsrc.org (HELO a.mx.sunsite.dk) (130.225.247.88) by sunsite.dk with SMTP; 19 Jun 2006 13:07:19 -0000 Received: (qmail 6758 invoked from network); 19 Jun 2006 13:07:19 -0000 Received: from wx-out-0102.google.com (66.249.82.204) by a.mx.sunsite.dk with SMTP; 19 Jun 2006 13:07:19 -0000 Received: by wx-out-0102.google.com with SMTP id s10so814970wxc for ; Mon, 19 Jun 2006 06:07:16 -0700 (PDT) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:sender:to:subject:mime-version:content-type:content-transfer-encoding:content-disposition:x-google-sender-auth; b=oZ0AgjB/VKCStcpkwUjWYpPsPil34u8mOPn6UnP2EYDeb34JiayPSHEXaI6hbvMMXGsDJIarzMmr0suEuyykoeshh+zduLWPDSoiS5jpWNtSW9m4IdHFo/R8GaXdgldYpgQ4jSLo+IUY70gOPMV6FrFMmqQk9TUOki3BhdwBszw= Received: by 10.70.14.5 with SMTP id 5mr8488948wxn; Mon, 19 Jun 2006 06:07:16 -0700 (PDT) Received: by 10.70.63.4 with HTTP; Mon, 19 Jun 2006 06:07:16 -0700 (PDT) Message-ID: Date: Mon, 19 Jun 2006 15:07:16 +0200 From: "Nikolai Weibull" Sender: nikolai.weibull@gmail.com To: "Zsh Users' List" Subject: Writing Zsh "libraries" MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline X-Google-Sender-Auth: 144b46dd30e59c30 As I have quite a few utilities written in pure Zsh, I've created a small library of functions that I often (re)use. The question is how to store such a library. Currently, I've just placed them in $ZDOTDIR/functions/zap and then added that directory to $fpath. That works fine, but I need to modify $fpath and prefix functions with "zap-". Then I had the "brilliant" idea of removing the prefixes - thus "zap-init" becomes "init" - and load them in the following manner instead: autoload -U zap/init Then I simply call the function as "zap/init" ($ZDOTDIR/functions is in my $fpath as well). This works and seems to be quite a nice way to handle namespacing, but perhaps I'm missing something vital here. Any comments? nikolai