zsh-users
 help / color / mirror / code / Atom feed
From: Michal Politowski <mpol@charybda.icm.edu.pl>
To: zsh-users@sunsite.dk
Subject: Re: "splitting prpblem"
Date: Thu, 11 Aug 2005 10:40:12 +0200	[thread overview]
Message-ID: <20050811084012.GA7429@Amber.lab.icm.edu.pl> (raw)
In-Reply-To: <20050811.051710.59487319.Meino.Cramer@gmx.de>

[-- Attachment #1: Type: text/plain, Size: 588 bytes --]

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 #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 189 bytes --]

  reply	other threads:[~2005-08-11  8:40 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <deliverable@gmail.com>
2005-08-10 19:18 ` rm nonexisting*; alias with parameters? Deliverable Mail
2005-08-10 20:06   ` Peter Stephenson
2005-08-10 20:31     ` Deliverable Mail
2005-08-10 22:51       ` Mikael Magnusson
2005-08-11  3:17         ` "splitting prpblem" Meino Christian Cramer
2005-08-11  8:40           ` Michal Politowski [this message]
2005-08-11 17:01             ` Meino Christian Cramer
2009-06-16  3:17 ` serverizing a fat process with named pipes Alexy Khrabrov
2009-06-16 20:29   ` Peter Stephenson
2009-06-17  0:47   ` Bart Schaefer

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20050811084012.GA7429@Amber.lab.icm.edu.pl \
    --to=mpol@charybda.icm.edu.pl \
    --cc=zsh-users@sunsite.dk \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/zsh/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).