Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: Would this (o) be very difficult to add?
- X-seq: zsh-workers 19155
- From: DervishD <raul@xxxxxxxxxxxx>
- To: Bart Schaefer <schaefer@xxxxxxxxxxxxxxxx>
- Subject: Re: Would this (o) be very difficult to add?
- Date: Sun, 28 Sep 2003 20:48:50 +0200
- Cc: Zsh <zsh-workers@xxxxxxxxxx>
- In-reply-to: <1030928174640.ZM17061@xxxxxxxxxxxxxxxxxxxxxxx>
- Mail-followup-to: Bart Schaefer <schaefer@xxxxxxxxxxxxxxxx>, Zsh <zsh-workers@xxxxxxxxxx>
- Mailing-list: contact zsh-workers-help@xxxxxxxxxx; run by ezmlm
- Organization: Pleyades
- References: <20030923161213.GA772@DervishD> <1030923165535.ZM29098@xxxxxxxxxxxxxxxxxxxxxxx> <20030924140114.GC411@DervishD> <20030927111834.GA277@DervishD> <1030927202240.ZM10318@xxxxxxxxxxxxxxxxxxxxxxx> <20030928092510.GA508@DervishD> <1030928174640.ZM17061@xxxxxxxxxxxxxxxxxxxxxxx>
Hi Bart :)
* Bart Schaefer <schaefer@xxxxxxxxxxxxxxxx> 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/
Messages sorted by:
Reverse Date,
Date,
Thread,
Author