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

Re: [PATCH?] Nofork and removing newlines



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