From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 1026 invoked from network); 27 Jan 2000 23:16:53 -0000 Received: from sunsite.auc.dk (130.225.51.30) by ns1.primenet.com.au with SMTP; 27 Jan 2000 23:16:53 -0000 Received: (qmail 3936 invoked by alias); 27 Jan 2000 23:16:38 -0000 Mailing-List: contact zsh-users-help@sunsite.auc.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 2896 Received: (qmail 3846 invoked from network); 27 Jan 2000 23:16:36 -0000 From: "Bart Schaefer" Message-Id: <1000127231623.ZM28160@candle.brasslantern.com> Date: Thu, 27 Jan 2000 23:16:23 +0000 In-Reply-To: Comments: In reply to Jason Price "I'm missing something with fpath." (Jan 27, 2:30pm) References: X-Mailer: Z-Mail Lite (5.0.0 30July97) To: Jason Price , zsh-users@sunsite.auc.dk Subject: Re: I'm missing something with fpath. MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii On Jan 27, 2:30pm, Jason Price wrote: > Subject: I'm missing something with fpath. > Or maybe globing. It's globbing. > for dirname in $fpath ; do > autoload $dirname/*(.x:t) > done Dump the "for" loop. You want a nice one-liner like autoload $^fpath/*(N.x:t) where the N means to silently drop any glob pattern that doesn't match any files. > $FUNCTIONDIR/compinit world executable on install, and the compinstall > function puts $FUNCTINDIR in .zshrc to be autoloaded from as above, > couldn't this lead to a bad new user experience? > > Or am I smoking crack/missing something obvious? You {sh,c}ould drop the `x' from the glob qualifiers. In general, there isn't any reason for a file that contains an autoloaded function to have its execute bit set. The only reason for making such a file executable is to be able to run it as a standalone shell script as well as run it as an autoloaded function.