Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: splitting in assignment forms of expansion
- X-seq: zsh-users 17501
- From: Han Pingtian <hanpt@xxxxxxxxxxxxxxxxxx>
- To: zsh-users@xxxxxxx
- Subject: Re: splitting in assignment forms of expansion
- Date: Thu, 27 Dec 2012 15:08:35 +0800
- In-reply-to: <CAHYJk3S6ncDedfiuFWzT5KN2=-6=ppdjLRiJZOMupCc5NZvtvQ@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: <20120927024236.GA7385@localhost.localdomain> <CAHYJk3S6ncDedfiuFWzT5KN2=-6=ppdjLRiJZOMupCc5NZvtvQ@mail.gmail.com>
On Thu, Sep 27, 2012 at 06:41:25AM +0200, Mikael Magnusson wrote:
> On 27/09/2012, Han Pingtian <hanpt@xxxxxxxxxxxxxxxxxx> wrote:
> > Hello,
> >
> > The manpage of zshexpn states about "${=...}":
> >
> > Note that splitting is applied to word in the assignment forms
> > of spec before the assignment to name is performed. This
> > affects the result of array assignments with the A flag.
> >
> > but looks like the splitting isn't applied to word first:
> >
> > % print -l ${=xx::=foo bar}
> > foo
> > bar
> > % print -l $xx
> > foo bar
> > %
> >
> > I'm confused on this. Please help.
>
> If you actually use the (A) flag,
> % print -l ${=xx::=foo bar} . $xx . ${(A)=xx::=foo bar} . $xx
> foo
> bar
> .
> foo bar
> .
> foo
> bar
> .
> foo
> bar
>
I think we should say something like this about this feature in the man
page:
Note during assignments with the A flag, that splitting is applied to word
in the assignment forms of spec before the assignment to name is performed.
This will affects the result.
This sounds more clearly. Right?
Messages sorted by:
Reverse Date,
Date,
Thread,
Author