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

Re: BUG: Initializations of named references with an empty string should trigger an error



Making at attempt to catch up with some of this stuff, but I don't
have a lot of time overall.

On Mon, May 26, 2025 at 12:08 PM Philippe Altherr
<philippe.altherr@xxxxxxxxx> wrote:
>
> The main aim of the proposed -S option is to ensure that each run of a "typeset", for example at the start of a loop, will have exactly the same effect, independent of whether the defined variables already exist or not.

Why is it insufficient to make the body of the loop an anonymous function?

for var in ... do
  () {
   typeset -n ref=
   ...
  }
done




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