From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 10985 invoked by alias); 22 Sep 2011 12:31:24 -0000 Mailing-List: contact zsh-users-help@zsh.org; run by ezmlm Precedence: bulk X-No-Archive: yes List-Id: Zsh Users List List-Post: List-Help: X-Seq: 16395 Received: (qmail 19216 invoked from network); 22 Sep 2011 12:31:23 -0000 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on f.primenet.com.au X-Spam-Level: X-Spam-Status: No, score=-2.7 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,RCVD_IN_DNSWL_LOW, T_TO_NO_BRKTS_FREEMAIL autolearn=ham version=3.3.1 Received-SPF: pass (ns1.primenet.com.au: SPF record at _spf.google.com designates 209.85.210.171 as permitted sender) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=date:from:to:subject:in-reply-to:message-id:references:user-agent :mime-version:content-type; bh=OD1JZvo05KQS8lSDgN1CMJbu3pTFr3QYoj8m4XEUFGs=; b=g/jJou98/SWRCZUsW65ReA8+qNJB1iBxZair9WuzQPI0O+t0eZBZqIfZV1xPQK8Aa+ 8WPDkdrHoSL7Kkvwt0/tY8xmc0bMSRCISDoRLnMlH92eUkstPN5iY7kduaCDDTwUBe/E JZ/hIf6SzEa/AdetIn7YqNJKPlYlzdxS8cyaM= Date: Thu, 22 Sep 2011 07:23:17 -0500 (CDT) From: Rory Mulvaney To: zsh-users@zsh.org Subject: Re: using parameter expansion sorting flags In-Reply-To: <20110922075936.GE4542@layslair.ath.cx> Message-ID: References: <20110922075936.GE4542@layslair.ath.cx> User-Agent: Alpine 2.00 (DEB 1167 2008-08-23) MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII I see what I was doing wrong now - I had been assigning PNMFILES2=${(o)PNMFILES} without the parentheses to indicate an array. I forgot... Thanks! On Thu, 22 Sep 2011, Anthony Charles wrote: > Hi, > > It works with o and n flags : > > % a=( f.0009.Atop.pnm f.0010.Atop.pnm f.0011.Atop.pnm > f.0012.Atop.pnm f.0009.Bbot.pnm f.0010.Bbot.pnm f.0011.Bbot.pnm) > > % print -l $a > f.0009.Atop.pnm > f.0010.Atop.pnm > f.0011.Atop.pnm > f.0012.Atop.pnm > f.0009.Bbot.pnm > f.0010.Bbot.pnm > f.0011.Bbot.pnm > > % print -l ${(on)a} > f.0009.Atop.pnm > f.0009.Bbot.pnm > f.0010.Atop.pnm > f.0010.Bbot.pnm > f.0011.Atop.pnm > f.0011.Bbot.pnm > f.0012.Atop.pnm > > % print -l ${${(on)a}[2]} > f.0009.Bbot.pnm > > % PNMFILES2=( ${(on)a} ) > % print -l ${PNMFILES2[2]} > f.0009.Bbot.pnm > > -- > Anthony CHARLES >