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

Re: "splitting prpblem"



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.

Attachment: signature.asc
Description: Digital signature



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