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

Re: function variables question



Timothy J Luoma wrote:
>I tend to use the same variable names in a lot of functions, such as 'name='  
>or 'short=' or 'for i in '
>
>Should I be doing 'unset name ; unset short ; unset i' at the end of them,  
>to keep them from interfering with each other?

No.  You should be doing 'local name', etc., at the start of the function,
to stop them interfering with anything else.

-zefram



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