From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 10490 invoked from network); 29 May 2006 19:19:13 -0000 X-Spam-Checker-Version: SpamAssassin 3.1.2 (2006-05-25) on f.primenet.com.au X-Spam-Level: X-Spam-Status: No, score=-2.5 required=5.0 tests=AWL,BAYES_00, FORGED_RCVD_HELO autolearn=ham version=3.1.2 Received: from news.dotsrc.org (HELO a.mx.sunsite.dk) (130.225.247.88) by ns1.primenet.com.au with SMTP; 29 May 2006 19:19:13 -0000 Received: (qmail 43564 invoked from network); 29 May 2006 19:19:07 -0000 Received: from sunsite.dk (130.225.247.90) by a.mx.sunsite.dk with SMTP; 29 May 2006 19:19:07 -0000 Received: (qmail 27677 invoked by alias); 29 May 2006 19:19:05 -0000 Mailing-List: contact zsh-workers-help@sunsite.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 22472 Received: (qmail 27667 invoked from network); 29 May 2006 19:19:04 -0000 Received: from news.dotsrc.org (HELO a.mx.sunsite.dk) (130.225.247.88) by sunsite.dk with SMTP; 29 May 2006 19:19:04 -0000 Received: (qmail 43321 invoked from network); 29 May 2006 19:19:04 -0000 Received: from vms044pub.verizon.net (206.46.252.44) by a.mx.sunsite.dk with SMTP; 29 May 2006 19:19:02 -0000 Received: from torch.brasslantern.com ([71.116.105.50]) by vms044.mailsrvcs.net (Sun Java System Messaging Server 6.2-4.02 (built Sep 9 2005)) with ESMTPA id <0J0100FWKKBOUZA2@vms044.mailsrvcs.net> for zsh-workers@sunsite.dk; Mon, 29 May 2006 14:19:02 -0500 (CDT) Received: from torch.brasslantern.com (localhost.localdomain [127.0.0.1]) by torch.brasslantern.com (8.13.1/8.13.1) with ESMTP id k4TJIxeZ001919; Mon, 29 May 2006 12:18:59 -0700 Received: (from schaefer@localhost) by torch.brasslantern.com (8.13.1/8.13.1/Submit) id k4TJIwDO001917; Mon, 29 May 2006 12:18:58 -0700 Date: Mon, 29 May 2006 12:18:58 -0700 From: Bart Schaefer Subject: Re: Keying arrays to names: is there an array of arrays? In-reply-to: To: zsh-workers@sunsite.dk, "Johann 'Myrkraverk' Oskarsson" Message-id: <060529121858.ZM1916@torch.brasslantern.com> MIME-version: 1.0 X-Mailer: OpenZMail Classic (0.9.2 24April2005) Content-type: text/plain; charset=us-ascii References: <44771E3E.9070102@ulpmm.u-strasbg.fr> <200605261540.k4QFeReG007573@news01.csr.com> <060527151044.ZM25448@torch.brasslantern.com> <060528111724.ZM29224@torch.brasslantern.com> Comments: In reply to "Johann 'Myrkraverk' Oskarsson" "Re: Keying arrays to names: is there an array of arrays?" (May 28, 9:32pm) [> zsh-workers] On May 28, 9:32pm, Johann 'Myrkraverk' Oskarsson wrote: } } Bart Schaefer 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. The (z) flag is supposed to split the line in the same way the shell parser would split it. IFS is only supposed to apply to "internal" field splitting; in the case of zsh, that means sh_word_split, the "read" builtin, etc. -- not the parser. That is, given this test script: print -l foo bar print -l 'foo bar' x='foo bar'; print -l $x setopt sh_word_split; print -l $x The result of source testscript is foo bar foo bar foo bar foo bar And the result of IFS="" source testscript is foo bar foo bar foo bar foo bar Note that parsing was unaffected, only expansion changed. Assign those same strings to an array: script=( ${(f)"$(