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

Re: Nofork ${{var}...} edge cases



On Sat, May 31, 2025 at 5:06 PM Bart Schaefer <schaefer@xxxxxxxxxxxxxxxx> wrote:
>
> On Sat, May 31, 2025 at 2:10 AM Mikael Magnusson <mikachu@xxxxxxxxx> wrote:
> >
> > I would argue that ${ foo} and ${ foo } should behave exactly the
> > same
>
> Ksh "${ foo}" is an incomplete parse, "${ foo} }" runs "foo}".
>
> Zsh tokenizes differently so it can't emulate that, but I thought I
> had it requiring that last space.
>
> Without more major parser surgery the only alternative for omitting
> the last space is "bad substitution" so I suppose it should just
> behave the same.
>
> > but also, I don't see a difference currently.
>
> Hm, it is taking part of the ${{} ...} code branch but then it's also
> going into a later ${ ... } branch.  I think it got that way because I
> was thinking about that "Future?" idea in the comment (see below).
>
> This is the easiest fix.  Doc update will have to come later, unless
> someone else wants a stab at it.

Great, this seems to work for me.

-- 
Mikael Magnusson




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