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

Re: How to have function local variable but must behave just a simple one




On 2023-08-26 13:26, Bart Schaefer wrote:
On Sat, Aug 26, 2023 at 12:34 AM Roman Perepelitsa
<roman.perepelitsa@xxxxxxxxx> wrote:
Zsh doesn't have the equivalent. You'll have to use a global parameter.
Why not have a global variable and then just make the assignment to a local variable at each call of the function and update the global when and where desired or let the local variable just die otherwise?  I suspect I don't really understand the problem.




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