From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 13354 invoked from network); 28 Sep 2003 18:45:10 -0000 Received: from sunsite.dk (130.225.247.90) by ns1.primenet.com.au with SMTP; 28 Sep 2003 18:45:10 -0000 Received: (qmail 28558 invoked by alias); 28 Sep 2003 18:45:04 -0000 Mailing-List: contact zsh-workers-help@sunsite.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 19155 Received: (qmail 28542 invoked from network); 28 Sep 2003 18:45:03 -0000 Received: from localhost (HELO sunsite.dk) (127.0.0.1) by localhost with SMTP; 28 Sep 2003 18:45:03 -0000 X-MessageWall-Score: 0 (sunsite.dk) Received: from [217.174.194.138] by sunsite.dk (MessageWall 1.0.8) with SMTP; 28 Sep 2003 18:45:3 -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 h8SIivv10323; Sun, 28 Sep 2003 20:44:58 +0200 Received: from raul@pleyades.net by DervishD.pleyades.net with local (Exim MTA 2.05) id <1A3gbC-0000BO-00>; Sun, 28 Sep 2003 20:48:50 +0200 Date: Sun, 28 Sep 2003 20:48:50 +0200 From: DervishD To: Bart Schaefer Cc: Zsh Subject: Re: Would this (o) be very difficult to add? Message-ID: <20030928184850.GA692@DervishD> Mail-Followup-To: Bart Schaefer , Zsh References: <20030923161213.GA772@DervishD> <1030923165535.ZM29098@candle.brasslantern.com> <20030924140114.GC411@DervishD> <20030927111834.GA277@DervishD> <1030927202240.ZM10318@candle.brasslantern.com> <20030928092510.GA508@DervishD> <1030928174640.ZM17061@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: <1030928174640.ZM17061@candle.brasslantern.com> User-Agent: Mutt/1.4i Organization: Pleyades User-Agent: Mutt/1.4i Hi Bart :) * Bart Schaefer dixit: > } array=(${(f)...}) > If you're storing in an array, you should skip the $(print -lP ...) part > (which requires forking a subshell) and do this instead: > array=( *(e:'REPLY="%0(l..$RANDOM)$REPLY"':) ) > array=( ${(%)array} ) Oh, I forgot the (%) flag and I stuck with the '-P' for interpreting %0. BTW, how works exactly the %0(l..$RANDOM) construction? I know that the (l..) is for padding with a random number, and I suppose the %0 is there for avoiding printing it, but I don't know how it exactly works... If you're tired of this feel free to ignore me ;) For me, %0 can only be a job specification, because I don't know about any prompt escape that fits just %NUMBER :? > } Can this be done directly in the command line for the 'command', > } or I'd better stuck with the array and the redirection? > I'm not entirely sure, but I suspect you mean something like this: > command ${(f)"$(print -lP ... >&1 > file.list)"} Yes, it will do. I just didn't know where should I do the redirection (or if it was possible at all...). Thanks a lot for showing :)) Raúl Núñez de Arenas Coronado -- Linux Registered User 88736 http://www.pleyades.net & http://raul.pleyades.net/