Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: Keying arrays to names: is there an array of arrays?
- X-seq: zsh-users 10335
- From: "Johann 'Myrkraverk' Oskarsson" <johann@xxxxxxxxxxxxxx>
- To: ZSH Users <zsh-users@xxxxxxxxxx>
- Subject: Re: Keying arrays to names: is there an array of arrays?
- Date: Sun, 28 May 2006 21:32:40 +0000
- In-reply-to: <060528111724.ZM29224@xxxxxxxxxxxxxxxxxxxxxx> (Bart Schaefer's message of "Sun, 28 May 2006 11:17:24 -0700")
- Mailing-list: contact zsh-users-help@xxxxxxxxxx; run by ezmlm
- References: <m33bewj29n.fsf@xxxxxxxxxxxxxxxxxx> <44771E3E.9070102@xxxxxxxxxxxxxxxxxx> <200605261540.k4QFeReG007573@xxxxxxxxxxxxxx> <m3wtc7gu80.fsf@xxxxxxxxxxxxxxxxxx> <060527151044.ZM25448@xxxxxxxxxxxxxxxxxxxxxx> <m3ejyeg9nh.fsf@xxxxxxxxxxxxxxxxxx> <060528111724.ZM29224@xxxxxxxxxxxxxxxxxxxxxx>
Bart Schaefer <schaefer@xxxxxxxxxxxxxxxx> writes:
> That's actually incorrect. The (z) option is already splitting the
> value; you shouldn't need or want to split it again with (s: :). If
> the setting of IFS is preventing (z) from working properly, that's
> probably a bug, but in any case the workaround is to make IFS local.
Well, all *I* know is that the s: : is needed -- at least without the
local IFS solution. If someone can (and is willing) to convince me
that's a bug (I don't yet understand all the flags involved in these
expansions) I can cook up some nice test case/bug report.
Thank you for the local IFS, that does look/appear to be cleaner.
> If you're going to use these functions for hash access anyway, then
> you might as well also use ${(q)2} instead of $2 in both of them, to
> avoid issues with non-alphanumeric keys.
Thank you. I'll keep that in mind if I run into the problem (dunno,
if I will, I'm prototyping an app and the keys will be filenames).
Johann
--
johann myrkraverk com (you know the drill with the @ and .)
I classify Outlook mail as spam, please use something else for
private messages.
Messages sorted by:
Reverse Date,
Date,
Thread,
Author