Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

using the "source" command in a "for" loop



I was using this with "zsh-2.6-beta13" in .zshenv

export ZDOTDIR=$homedir/Unix/zsh/source/

for i in `/bin/ls -1 $ZDOTDIR`
do
        echo -n "Sourcing $i... "

        # source the file
        source "$ZDOTDIR/$i"

        # set up variables using the filenames
        $i="$ZDOTDIR/$i"
        echo "done"
done

now with 3.0.2 I get this:

/Users/luomat/.zshenv: no such file or directory:  
aliases=/Users/luomat/Unix/zsh/source//aliases [91]

(where "aliases" is a filename)

this was a handy thing, where I could add or remove files to be  
sourced simply by putting them in or taking them out of the folder.

AND I also got a variable made at the same time, which was handy  
because then I could do "pico $aliases" rather than "pico  
$ZDOTDIR/aliases" which I always seem to fumble over.

Is there a new way to do this?  What am I doing wrong?

Thanks!

TjL

--
	Tj Luoma (luomat@xxxxxxxx)
		http://www.next.peak.org/~luomat
			Awaiting Apple's NeXTStep



Messages sorted by: Reverse Date, Date, Thread, Author