From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 1307 invoked from network); 14 Apr 2004 18:06:45 -0000 Received: from sunsite.dk (130.225.247.90) by ns1.primenet.com.au with SMTP; 14 Apr 2004 18:06:45 -0000 Received: (qmail 8703 invoked by alias); 14 Apr 2004 18:06:12 -0000 Mailing-List: contact zsh-users-help@sunsite.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 7350 Received: (qmail 8690 invoked from network); 14 Apr 2004 18:06:11 -0000 Received: from localhost (HELO sunsite.dk) (127.0.0.1) by localhost with SMTP; 14 Apr 2004 18:06:11 -0000 X-MessageWall-Score: 0 (sunsite.dk) Received: from [130.225.247.86] by sunsite.dk (MessageWall 1.0.8) with SMTP; 14 Apr 2004 18:6:8 -0000 Received: (qmail 12326 invoked from network); 14 Apr 2004 18:06:07 -0000 Received: from madrid10.amenworld.com (62.193.203.32) by a.mx.sunsite.dk with SMTP; 14 Apr 2004 18:06:05 -0000 Received: from DervishD.pleyades.net (212.Red-80-35-44.pooles.rima-tde.net [80.35.44.212]) by madrid10.amenworld.com (8.10.2/8.10.2) with ESMTP id i3EI60602813; Wed, 14 Apr 2004 20:06:01 +0200 Received: from raul@pleyades.net by DervishD.pleyades.net with local (Exim MTA 2.05) id <1BDn0j-0000Af-00>; Wed, 14 Apr 2004 18:13:13 +0200 Date: Wed, 14 Apr 2004 18:13:13 +0200 From: DervishD To: Bart Schaefer Cc: Zsh Users Subject: Re: Subscripting without temporaries Message-ID: <20040414161313.GA658@DervishD> Mail-Followup-To: Bart Schaefer , Zsh Users References: <20040413120053.GA4420@DervishD> <040413082948.ZM20696@candle.brasslantern.com> <20040413171443.GA3850@DervishD> <040413185850.ZM21526@candle.brasslantern.com> Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <040413185850.ZM21526@candle.brasslantern.com> User-Agent: Mutt/1.4.2.1i Organization: Pleyades X-Spam-Checker-Version: SpamAssassin 2.63 on a.mx.sunsite.dk X-Spam-Level: X-Spam-Status: No, hits=0.0 required=6.0 tests=none autolearn=no version=2.63 X-Spam-Hits: 0.0 Hi Bart :) * Bart Schaefer dixit: > > I tried the same using more or less what you suggests below, but I > > didn't get far because I cannot do $array[EXP][Whatever] (well, > > namely I was trying ${array[10]}[1,8], but zsh told me 'no matches > > found'). > Heh. You *can* do ${array[EXP][Whatever]}, > or you can do ${${array[EXP]}[Whatever]}, > but you can't do what you said you tried. S**t, how embarrasing... I didn't even try those two combinations. Well, that way I don't need a temporary. > Also there was a bug until recently where if EXP is a negative number, > then the result of $array[EXP] is still an array rather than a string, > so then the [Whatever] fails to slice the string. I'm planning to upgrade to Zsh 4.2.x as soon as the next version is releases, so I hope I don't get bite by that bug in the interim. Thanks a LOT for your help :) Raúl Núñez de Arenas Coronado -- Linux Registered User 88736 http://www.pleyades.net & http://raul.pleyades.net/