Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: When array append without parens doesn't work?
- X-seq: zsh-workers 45469
- From: Roman Perepelitsa <roman.perepelitsa@xxxxxxxxx>
- To: Sebastian Gniazdowski <sgniazdowski@xxxxxxxxx>
- Subject: Re: When array append without parens doesn't work?
- Date: Tue, 18 Feb 2020 22:45:10 +0100
- Cc: Zsh hackers list <zsh-workers@xxxxxxx>
- In-reply-to: <CAKc7PVCLMaR3=Y0PguBgZcSNvmrh-E+uvApSXeguU4XYrGyVYw@mail.gmail.com>
- List-help: <mailto:zsh-workers-help@zsh.org>
- List-id: Zsh Workers List <zsh-workers.zsh.org>
- List-post: <mailto:zsh-workers@zsh.org>
- List-unsubscribe: <mailto:zsh-workers-unsubscribe@zsh.org>
- Mailing-list: contact zsh-workers-help@xxxxxxx; run by ezmlm
- References: <CAKc7PVCLMaR3=Y0PguBgZcSNvmrh-E+uvApSXeguU4XYrGyVYw@mail.gmail.com>
On Tue, Feb 18, 2020 at 10:33 PM Sebastian Gniazdowski
<sgniazdowski@xxxxxxxxx> wrote:
>
> Hi,
> I recall once reporting a problem to this list, to which Bart responded
> with "you'll thank me later" about the correct array-append syntax, which
> is arr+=( ... ), not arr+=.... I cannot find this message.
Code:
() {
emulate -L zsh -o ksh_arrays
local -a x
x+=a
x+=b
typeset -p x
}
Output:
typeset -a x=( ab )
Roman.
Messages sorted by:
Reverse Date,
Date,
Thread,
Author