Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: "splitting prpblem"



From: Michal Politowski <mpol@xxxxxxxxxxxxxxxxxxx>
Subject: Re: "splitting prpblem"
Date: Thu, 11 Aug 2005 10:40:12 +0200

Hi Michael, 

 YES, YES, YEEEEEES!!!
 I *want* arrays -- right *N*O*W* ! At once ! 

 Where can I get them and what do they cost ? 

 ....and do they keep care of the environment?

 :)

 Ok...more seriously...
 I maked an array from my variable and TADA! it works! Great hint!
 Thanks a lot, Micheal!

 Have a nice weekend!
 Meino
 
> On Thu, 11 Aug 2005 05:17:10 +0200, Meino Christian Cramer wrote:
> [...]
> >  Is there a way to say: "Hey zsh,...if you expand this variable,
> >  please let it look like single options..." ?
> 
> You want to use an array:
> opt=(-t7z -m0=lzma -mx=8 -mfb=64)
> 
> zsh doesn't split scalar parameters on expansion unless the option sh_word_split is set.
> You can also set it for the duration of a single expansion using ${=opt}
> but for your own new script you really _do_ want to use arrays :)
> 
> -- 
> Michał Politowski
> Talking has been known to lead to communication if practiced carelessly.



Messages sorted by: Reverse Date, Date, Thread, Author