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

Re: limit scope of variable



On 2021-08-03 1:39 p.m., Bart Schaefer wrote:

called_function() {
   local IFS; unset IFS # use default
   ...
}

That's all it takes.  Indeed I just wanted the default but I didn't know I could just unset the variable.  Sounds like the sort of thing that might cause some sort of deep breakage like erasing your $PATH or something.  Anyway the unset seems fine, thanks Bart and Vin. Probably if I was better I could avoid tinkering with IFS at all.






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