From: "Jérémie Roquet" <arkanosis@gmail.com>
To: sergio <mailbox@sergio.spb.ru>
Cc: zsh-users@zsh.org
Subject: Re: dumb question about parameter expansion
Date: Thu, 11 Oct 2012 14:19:00 +0200 [thread overview]
Message-ID: <CAFOazANSRDEGw-HqE53pvi0+P-TgcVT_06DfEnV5LT3tpOnNRg@mail.gmail.com> (raw)
In-Reply-To: <5076B49A.90101@sergio.spb.ru>
Hi Sergio,
2012/10/11 sergio <mailbox@sergio.spb.ru>:
> Looks like it's dumb question, but I can't understand this.
>
> % zsh -f
> % l='ls'
> % o='-l -h'
> % $l $o
> ls: invalid option -- ' '
> Try `ls --help' for more information.
>
> % ls -l -h
> total 512
> drwxr-x--- 2 sergio sergio ...
Unlike other shells, zsh doesn't split unquoted variables by default.
If you want that behaviour, you can either:
- “setopt shwordsplit” to have it by default, or
- use “$l $=o” to have it selectively (the “=” forces the split).
Best regards,
--
Jérémie
next prev parent reply other threads:[~2012-10-11 12:46 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-10-11 11:59 sergio
2012-10-11 12:19 ` Jérémie Roquet [this message]
2012-10-11 12:20 ` Frank Terbeck
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=CAFOazANSRDEGw-HqE53pvi0+P-TgcVT_06DfEnV5LT3tpOnNRg@mail.gmail.com \
--to=arkanosis@gmail.com \
--cc=mailbox@sergio.spb.ru \
--cc=zsh-users@zsh.org \
/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).