From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 23722 invoked from network); 11 Apr 1999 00:13:06 -0000 Received: from sunsite.auc.dk (130.225.51.30) by ns1.primenet.com.au with SMTP; 11 Apr 1999 00:13:06 -0000 Received: (qmail 4163 invoked by alias); 11 Apr 1999 00:12:41 -0000 Mailing-List: contact zsh-users-help@sunsite.auc.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 2289 Received: (qmail 4077 invoked from network); 11 Apr 1999 00:12:40 -0000 Message-Id: <199904102349.TAA03697@ocalhost> Content-Type: text/plain MIME-Version: 1.0 X-Image-URL: http://www.peak.org/~luomat/luomat@peak.org.tiff From: Timothy J Luoma Date: Sat, 10 Apr 1999 19:49:32 -0400 To: zsh-users@sunsite.auc.dk Subject: Re: why doesn't 'source *' work? Replying to message of 10 Apr 1999 23:19:06 +0100 from Bruce Stephens regarding ``Re: why doesn't 'source *' work?'' > > Is there a reason why 'source *' doesn't work? > In what way doesn't it work? $ cd /Users/tjl/Unix/zsh/source/functions/complex $ ls addwhite df-sort-by-used oeu cd ej pine cksub extract-serv replace-icon del kill replace-serv df-sort lkincds unimg df-sort-by-avail ls-tar untar df-sort-by-mount mv2lbin verify df-sort-by-percent mv2scripts whois df-sort-by-size oaf wn-to-rtf $ which oeu oeu not found zsh: exit 1 $ source * $ which oeu oeu not found zsh: exit 1 $ PATH=$PATH:. $ source * $ which oeu oeu not found zsh: exit 1 $ echo $PATH_DIRS $ > According to the manual: > If any arguments arg are given, they become the positional > parameters; the old positional parameters are restored when the > file is done executing. The exit status is the exit status of the > last command executed. > > I'm guessing you missed the bit about the positional parameters. Or just don't understand what the heck that means. > If you want to source all the files (giving them no parameters), > you'll need to use a loop: > > for i in * > do > source $i > done even simpler (and seems to work): for i in ~/Unix/zsh/source/functions/complex/*; source $i however I still don't understand why 'source *' doesn't accomplish the same thing... perhaps I'm a bit dense. > You could wrap this in an autoloaded function, if you wanted. But not > a shell script, obviously. (Well, probably not.) I added for i in ~/Unix/zsh/source/functions/complex/*; source $i to my .zshenv... that seems to work. TjL