Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: Nofork ${{var}...} edge cases
- X-seq: zsh-workers 53714
- From: Mikael Magnusson <mikachu@xxxxxxxxx>
- To: Bart Schaefer <schaefer@xxxxxxxxxxxxxxxx>
- Cc: Zsh hackers list <zsh-workers@xxxxxxx>
- Subject: Re: Nofork ${{var}...} edge cases
- Date: Sat, 31 May 2025 19:52:40 +0200
- Archived-at: <https://zsh.org/workers/53714>
- In-reply-to: <CAH+w=7ZSYNvTJT+_q_1bCvKBPOqzR9VyRY_eHjXAohaMv_PHHA@mail.gmail.com>
- List-id: <zsh-workers.zsh.org>
- References: <CAH+w=7YHZspc2JVBxkkYO69Cr9x__s-m4UQqRUfOetZYssUqnw@mail.gmail.com> <42966-1711578160.323146@w_2U.aZv1.yyMw> <CAH+w=7Y7gD8vKsk-=UEaf4N0j9u+ruNKS8nUZGZNAb23cRGSEQ@mail.gmail.com> <CAH+w=7akD45JDWRdRwrEbO9_2SMYgZYm2ctprx+JVo4F=Pur-Q@mail.gmail.com> <CAH+w=7ZpN6KVEWJGVjA-Yh8zYeQ1kRTxeaY8pZBmquv-XPVtmA@mail.gmail.com> <CAHYJk3S1RG0cOMnGEEG5_RHdGMbhRNPe1GJe3xNsYbTi5M1zMg@mail.gmail.com> <CAH+w=7YLXfVfy8imAThELDDNEOmx4ftYJUaaXfKcqn47no8a5w@mail.gmail.com> <CAHYJk3SLadPiZZDhKpP22Hbm2SZ7whUj+KbaXKe3Lzg4C7mdBA@mail.gmail.com> <CAH+w=7ZSYNvTJT+_q_1bCvKBPOqzR9VyRY_eHjXAohaMv_PHHA@mail.gmail.com>
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