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 17334
- From: Han Pingtian <hanpt@xxxxxxxxxxxxxxxxxx>
- To: zsh-users@xxxxxxx
- Subject: Re: z flag in parameter expansion doesn't use $IFS ?
- Date: Fri, 19 Oct 2012 16:53:27 +0800
- In-reply-to: <CAECNH1TXtAQgefN0HwF6Ybr_gbpw=qX+oYhWBVP2GyCJ7CH6pA@mail.gmail.com>
- 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> <CAECNH1TXtAQgefN0HwF6Ybr_gbpw=qX+oYhWBVP2GyCJ7CH6pA@mail.gmail.com>
On Fri, Oct 19, 2012 at 09:26:22AM +0100, Peter Stephenson wrote:
> 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
Thanks a lot.
Messages sorted by:
Reverse Date,
Date,
Thread,
Author