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

Re: autoload bug in 2.6-beta10



>It appears that parameters are not passed to autoload functions
>in 2.6-beta10. Sorry if this had already been reported, but I
>joined the mailing list fairly recently.
>
>e.g. 
>	foo() { echo $1 }
>
>If this function is autoloaded, then invoking "foo test" results
>in echoing a blank line.

This is not a bug.  At least, not entirely.  Autoloaded function files
should not contain the foo() bit, as the entire contents of the file is
taken as the contents of the function.  The first time you run the
undefined function, it just redefines itself.  The second time, it will
do what you want.  This is explained in section C5 of the Zsh FAQ.

But zsh is supposed to accept the Korn shell syntax, as of a few betas
ago, so there is a bug here.

-zefram



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