From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 14943 invoked from network); 30 Jun 2009 15:08:53 -0000 X-Spam-Checker-Version: SpamAssassin 3.2.5 (2008-06-10) on f.primenet.com.au X-Spam-Level: X-Spam-Status: No, score=-2.6 required=5.0 tests=AWL,BAYES_00 autolearn=ham version=3.2.5 Received: from new-brage.dotsrc.org (HELO a.mx.sunsite.dk) (130.225.254.104) by ns1.primenet.com.au with SMTP; 30 Jun 2009 15:08:53 -0000 Received-SPF: none (ns1.primenet.com.au: domain at sunsite.dk does not designate permitted sender hosts) Received: (qmail 10391 invoked from network); 30 Jun 2009 15:08:35 -0000 Received: from sunsite.dk (130.225.247.90) by a.mx.sunsite.dk with SMTP; 30 Jun 2009 15:08:35 -0000 Received: (qmail 29554 invoked by alias); 30 Jun 2009 15:08:23 -0000 Mailing-List: contact zsh-workers-help@sunsite.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 27074 Received: (qmail 29532 invoked from network); 30 Jun 2009 15:08:21 -0000 Received: from bifrost.dotsrc.org (130.225.254.106) by sunsite.dk with SMTP; 30 Jun 2009 15:08:21 -0000 Received: from QMTA08.westchester.pa.mail.comcast.net (qmta08.westchester.pa.mail.comcast.net [76.96.62.80]) by bifrost.dotsrc.org (Postfix) with ESMTP id 677B6801E289 for ; Tue, 30 Jun 2009 17:08:18 +0200 (CEST) Received: from OMTA02.westchester.pa.mail.comcast.net ([76.96.62.19]) by QMTA08.westchester.pa.mail.comcast.net with comcast id ACEP1c0080QuhwU58F8JPW; Tue, 30 Jun 2009 15:08:18 +0000 Received: from smtp.klanderman.net ([98.217.254.247]) by OMTA02.westchester.pa.mail.comcast.net with comcast id AF8J1c0055M2Np63NF8JU0; Tue, 30 Jun 2009 15:08:18 +0000 Received: from lwm.klanderman.net (unknown [192.168.100.50]) by smtp.klanderman.net (Postfix) with ESMTP id DB6CEB3014A for ; Tue, 30 Jun 2009 11:08:16 -0400 (EDT) Received: by lwm.klanderman.net (Postfix, from userid 500) id B59099FC61E; Tue, 30 Jun 2009 11:08:16 -0400 (EDT) From: Greg Klanderman To: zsh-workers@sunsite.dk Subject: Re: use 'P' parameter expansion flag with array? Reply-To: gak@klanderman.net Date: Tue, 30 Jun 2009 11:08:16 -0400 In-Reply-To: <200906300843.n5U8hecG011236@news01.csr.com> (Peter Stephenson's message of "Tue, 30 Jun 2009 09:43:40 +0100") Message-ID: User-Agent: Gnus/5.1007 (Gnus v5.10.7) XEmacs/21.4.17 (linux) References: <19017.33909.493608.356003@gargle.gargle.HOWL> <200906300843.n5U8hecG011236@news01.csr.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Virus-Scanned: ClamAV 0.94.2/9523/Tue Jun 30 15:32:25 2009 on bifrost X-Virus-Status: Clean > It does seem logical, but the code is obscure and it's not clear whether > this was intended or not---it probably fell through the cracks. Thank you Peter, I'll just use a loop then.. > paramsubst() is full of my "one day someone should spend a year tidying > this up" comments. Yeah I enjoyed reading a number of those last night after sending that question :-) So if I have an array and want to append a string to each of the elements, then join with colon, is there a better way than this: lwm% a=(x y z) lwm% echo ${(j.:.)${(@)a/%/foo}} xfoo:yfoo:zfoo I was trying to do something using '^' but it doesn't seem to work; lwm% echo ${(@)^a}foo xfoo yfoo zfoo does what I expect, but: lwm% echo ${(j.:.)${(@)^a}foo} zsh: bad substitution does not. thanks, Greg