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

Re: LOCAL_VARS option ?



On Thu, Jan 19, 2017 at 06:54:08AM +0000, Daniel Shahaf wrote:
> Phil suggested on IRC a LOCAL_VARS option that has the effect of making
> all newly-declared variables local; e.g.,

Hmmm, I like the implicit way ksh93 does it, i.e. if declared within a
"function $fname {...}" declared function using 'typeset', it has local
scope, otherwise (i.e. not typeset or typeset in "$fname() { ... }" aka
old style declared functions) shared. Not sure, whether this can be
accomplished with zsh as well ...

have fun,
jel.
-- 
Otto-von-Guericke University     http://www.cs.uni-magdeburg.de/
Department of Computer Science   Geb. 29 R 027, Universitaetsplatz 2
39106 Magdeburg, Germany         Tel: +49 391 67 52768



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