From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 16148 invoked from network); 28 Sep 2003 17:46:53 -0000 Received: from sunsite.dk (130.225.247.90) by ns1.primenet.com.au with SMTP; 28 Sep 2003 17:46:53 -0000 Received: (qmail 20239 invoked by alias); 28 Sep 2003 17:46:48 -0000 Mailing-List: contact zsh-workers-help@sunsite.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 19153 Received: (qmail 20227 invoked from network); 28 Sep 2003 17:46:47 -0000 Received: from localhost (HELO sunsite.dk) (127.0.0.1) by localhost with SMTP; 28 Sep 2003 17:46:47 -0000 X-MessageWall-Score: 0 (sunsite.dk) Received: from [4.3.58.249] by sunsite.dk (MessageWall 1.0.8) with SMTP; 28 Sep 2003 17:46:46 -0000 Received: (from schaefer@localhost) by candle.brasslantern.com (8.11.6/8.11.6) id h8SHkep17062 for zsh-workers@sunsite.dk; Sun, 28 Sep 2003 10:46:40 -0700 From: Bart Schaefer Message-Id: <1030928174640.ZM17061@candle.brasslantern.com> Date: Sun, 28 Sep 2003 17:46:40 +0000 In-Reply-To: <20030928092510.GA508@DervishD> Comments: In reply to DervishD "Re: Would this (o) be very difficult to add?" (Sep 28, 11:25am) References: <20030923161213.GA772@DervishD> <1030923165535.ZM29098@candle.brasslantern.com> <20030924140114.GC411@DervishD> <20030927111834.GA277@DervishD> <1030927202240.ZM10318@candle.brasslantern.com> <20030928092510.GA508@DervishD> X-Mailer: Z-Mail (5.0.0 30July97) To: Zsh Subject: Re: Would this (o) be very difficult to add? MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii On Sep 28, 11:25am, DervishD wrote: } } Another thing I'm doing with all this is storing the generated } list on an array, because sometimes I wan't to have the list passed to } a command and stored in a file, and I do with the array: } } 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} ) } command $array } print -l $array > file.list } } 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)"} This only works if you have the MULTIOS option set; if you don't use that, you need something like command ${(f)"$(print -lP ... | tee file.list)"}