Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: splitting in assignment forms of expansion
- X-seq: zsh-users 17292
- From: Mikael Magnusson <mikachu@xxxxxxxxx>
- To: Han Pingtian <hanpt@xxxxxxxxxxxxxxxxxx>
- Subject: Re: splitting in assignment forms of expansion
- Date: Thu, 27 Sep 2012 06:41:25 +0200
- Cc: zsh-users@xxxxxxx
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=b/1tb7P/t9ATfwtsPGyx7QBYq5MwMJcdSjEBqeRj7ZE=; b=Ugn0q5nv8qoHHKEAfb/3sn6+02kV+q3ld0faEhZjnW/J1U0cBebG+8lT1nEmHE52ST PVFPDQosoae3YNkgd3ab0HiFz50VZhjA2qxx0eYHtbAN2AZH74tKeMpi+2FfwN8CYUfb HxuMV7fznmxrf0sW5ubqtvxaLFK7syC8Hiu4yBl2VABVDawH0DSl5OS9d4S4obEbCaZy ljyms9svF3huE/qAJATbJswbUiVRFUHM/xM5oNYZKQy/DMYr06ph9c+oUzB7kIh51BI8 IEmmDDD+0WrqlLG7Yjp0mwgBNrGluYP3zVocWLZU8NpLH4KA58lofxiOKIfDITDfQWyX W2Ag==
- In-reply-to: <20120927024236.GA7385@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: <20120927024236.GA7385@localhost.localdomain>
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
--
Mikael Magnusson
Messages sorted by:
Reverse Date,
Date,
Thread,
Author