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

Re: why doesn't 'source *' work?



Timothy J Luoma <tjlists@xxxxxxxxxxx> writes:

> > 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 do "source a b c d e", then the file "a" gets sourced, with the
positional parameters set: $1 gets set to "b", $2 to "c", $3 to "d"
and $4 to "e".

The same kind of behaviour that you get with shell functions and
things.



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