Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: z flag in parameter expansion doesn't use $IFS ?
- X-seq: zsh-users 17333
- From: Peter Stephenson <p.w.stephenson@xxxxxxxxxxxx>
- To: zsh-user <zsh-users@xxxxxxx>
- Subject: Re: z flag in parameter expansion doesn't use $IFS ?
- Date: Fri, 19 Oct 2012 09:26:22 +0100
- In-reply-to: <20121018221826.GA6056@localhost.localdomain>
- List-help: <mailto:zsh-users-help@zsh.org>
- List-id: Zsh Users List <zsh-users.zsh.org>
- List-post: <mailto:zsh-users@zsh.org>
- Mailing-list: contact zsh-users-help@xxxxxxx; run by ezmlm
- References: <20121018221826.GA6056@localhost.localdomain>
On Fri, 19 Oct 2012 06:18:26 +0800
Han Pingtian <hanpt@xxxxxxxxxxxxxxxxxx> wrote:
> It looks like the z flag of parameter expansion doesn't care what the
> value of IFS is:
Yes, this is correct. It's using the shell grammar for this. If you
type "echo foo", it doesn't matter what IFS is, it will always treat
that as two words with space as separator. The other splitting flags
use IFS.
> I just found that it looks like the z flag won't cause "forced joining"
> which stated in rules 10, like this:
Yes, (z) is not like the other splitting flags. It's a utility for when you
need something that obeys shell parsing rules. It's not a simple
word-splitting tool, which is what the other splitting flags are for.
pws
Messages sorted by:
Reverse Date,
Date,
Thread,
Author