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



On Thu, May 22, 2025 at 11:52 PM Bart Schaefer
<schaefer@xxxxxxxxxxxxxxxx> wrote:
> > On Thu, May 22, 2025 at 6:36 PM Mikael Magnusson <mikachu@xxxxxxxxx> wrote:
> >>
> >> I'll just remove the third line.
>
> I was thinking more of providing examples that someone might see in
> (other people's) code and wonder what they meant.

My thinking was that this documentation might cause a further
proliferation of people adding these pointless quotes, thinking they
make a difference. (A lot of people have weird misconceptions about
how quotes work in shells already.) It's certainly minor enough that I
won't push back more on it.

> >> (Other identical commands would be
> >> typeset"" -n"" pname= and typese"t" -"n" pname"=" for example, which I
> >> think everyone will agree would be silly to list.)
>
> They're not identical if you consider that typeset is a reserved word
> and typese"t" etc. are just a builtin, but that wasn't ever the point.

Right, I got a bit carried away with adding quotes I suppose :).

-- 
Mikael Magnusson




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