Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: [PATCH?] Nofork and removing newlines
- X-seq: zsh-workers 52723
- From: Oliver Kiddle <opk@xxxxxxx>
- To: Bart Schaefer <schaefer@xxxxxxxxxxxxxxxx>
- Cc: zsh-workers@xxxxxxx
- Subject: Re: [PATCH?] Nofork and removing newlines
- Date: Sat, 09 Mar 2024 21:43:58 +0100
- Archived-at: <https://zsh.org/workers/52723>
- In-reply-to: <CAH+w=7Zv1RsPoFBsLVjqS5wh0n4wQpsVQg3z2pKpfuYkjRk6CA@mail.gmail.com>
- List-id: <zsh-workers.zsh.org>
- References: <CAH+w=7aFJH-5GAu6puszGKvjqN-w0sPCi6v-vGPauDHVujDnag@mail.gmail.com> <20240305065606.ccr2ieheahslcpye@chazelas.org> <CAH+w=7Yb6_eULBq6Ez6pEhtUXOqErr+aDL2BDi7zyxr8QpsTiw@mail.gmail.com> <20240306175711.t3uz2sery3b6tbjw@chazelas.org> <CAH+w=7a5K8ioO+mP8RXvtmawHJFfFw1jOWE49GmZdAOVaTPjUQ@mail.gmail.com> <CAHYJk3Tmh0xVQodHuXycDDv21_xgkhq5hvGZgPrZbLUYox2bGA@mail.gmail.com> <CAH+w=7Yq7e7JOiN51=vQjUvS+Yi6xY0VAJUGjoraeBKKazAnkw@mail.gmail.com> <c053e1e2-b9e1-44af-aae4-4998e768e7ed@app.fastmail.com> <CAH+w=7b24HxJMGUBqjC7Fgx3ycLWwAuK0CTpwSSryb0XXxEHMw@mail.gmail.com> <90726-1709936102.086878@xlWC.oGpX.V4Q4> <CAH+w=7Zv1RsPoFBsLVjqS5wh0n4wQpsVQg3z2pKpfuYkjRk6CA@mail.gmail.com>
Bart Schaefer wrote:
> See above about the requirement for it to look like ${|ident|...}.
> Since = * and ? are not identifiers, this is like writing { =|: } etc.
Ok, that makes sense. Thanks
> and you get the same errors. All of the non-identifier special
> parameters are read-only so it doesn't make sense to assign to them,
> and the |ident| has to be assignable for the expansion to mean
> anything, so why allow them in that position? Unless you're just going
> for side-effects, but then why use the |var| form?
You may not be able to assign to it directly but I can think of uses
for $? (and perhaps also $!) if supported there. That is assuming $? is the
return status for the command running inside the expansion. Being an
identifier, $_ does work there, not that it's especially useful. $1, $2
etc also work.
Oliver
Messages sorted by:
Reverse Date,
Date,
Thread,
Author