Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: PATCH: pws-19: minor syntactic innovation
- X-seq: zsh-workers 6399
- From: "Bart Schaefer" <schaefer@xxxxxxxxxxxxxxxxxxxxxxx>
- To: zsh-workers@xxxxxxxxxxxxxx (Zsh hackers list)
- Subject: Re: PATCH: pws-19: minor syntactic innovation
- Date: Mon, 31 May 1999 22:41:00 +0000
- In-reply-to: <9905231515.AA16080@xxxxxxxxxxxxxxxxx>
- Mailing-list: contact zsh-workers-help@xxxxxxxxxxxxxx; run by ezmlm
- References: <9905231515.AA16080@xxxxxxxxxxxxxxxxx>
On May 23, 5:15pm, Peter Stephenson wrote:
} Subject: PATCH: pws-19: minor syntactic innovation
}
} Just thought of a trivial way to take a lot of grief out of parameter
} substitution. This patch makes the following valid:
}
} ${${${${(f)"$(typeset)"}:#*local *\=*}%%\=*}##* }
OK, the patch is straightforward to adapt and the results seem to be the
same in 3.0.6-pre-3 and 3.1.5-pws-20.
A few questions come up, however:
What's the parse of something like ${(f)"${"$(typeset)"}"} ? It doesn't
seem to be the `obvious' one -- it appears that the quoted strings are
actually nesting, because of the enclosing braces, which is something
pretty radically new. (I may be wrong.) Is this a good thing?
What's the right way to document this change, including odd stuff like
the above?
Should the FAQ recommend using this form in some circumstances because
of the (@) change in 3.1.5?
--
Bart Schaefer Brass Lantern Enterprises
http://www.well.com/user/barts http://www.brasslantern.com
Messages sorted by:
Reverse Date,
Date,
Thread,
Author