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 45471
- From: Sebastian Gniazdowski <sgniazdowski@xxxxxxxxx>
- To: Roman Perepelitsa <roman.perepelitsa@xxxxxxxxx>
- Subject: Re: When array append without parens doesn't work?
- Date: Wed, 19 Feb 2020 00:35:33 +0100
- Cc: Zsh hackers list <zsh-workers@xxxxxxx>
- In-reply-to: <CAN=4vMpXfR6VhZ4Mq6+5hTvmXRW5e_HBrq0rh26Qgs4mY_bsmg@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> <CAN=4vMpXfR6VhZ4Mq6+5hTvmXRW5e_HBrq0rh26Qgs4mY_bsmg@mail.gmail.com>
On Tue, 18 Feb 2020 at 22:45, Roman Perepelitsa <roman.perepelitsa@xxxxxxxxx>
wrote:
> 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.
>
Thanks, however, I don't think that I was using ksharrays when I've
encountered problems with +=....
--
Sebastian Gniazdowski
News: https://twitter.com/ZdharmaI
IRC: https://kiwiirc.com/client/chat.freenode.net:+6697/#zinit
Blog: http://zdharma.org
Messages sorted by:
Reverse Date,
Date,
Thread,
Author