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

zsh bug with local variables?



I'm running zsh-3.1.4 (zsh -f) on solaris 2.5.1, and type:

pochacco% function foo () { local foobar ; foobar=( "$@" ) ; bar ; echo "foobar= ${foobar[*]}" ; }
pochacco% function bar () { local foobar ; foobar=( foo bar ) ; }
pochacco% foo hello there
foobar= foo bar

Is this a bug?  Notice the outer local variable has been set when 
only the inner one should have been.  Bash 2.02 does handle this
as expected.

Another random question, is there a clean way to test whether there
is a function defined with a given name?

thanks,
Greg

ps- zsh is excellent, thanks!



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