Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: PATCH: Explain array append a bit better
- X-seq: zsh-workers 33853
- From: Bart Schaefer <schaefer@xxxxxxxxxxxxxxxx>
- To: zsh workers <zsh-workers@xxxxxxx>
- Subject: Re: PATCH: Explain array append a bit better
- Date: Fri, 05 Dec 2014 00:05:51 -0800
- In-reply-to: <CAHYJk3R49_MSWWQQ_HTb-iFWnZQ_99LUeLKrVbC8WA=a8AeLgg@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>
- Mailing-list: contact zsh-workers-help@xxxxxxx; run by ezmlm
- References: <141203205120.ZM7564@torch.brasslantern.com> <CAHYJk3R49_MSWWQQ_HTb-iFWnZQ_99LUeLKrVbC8WA=a8AeLgg@mail.gmail.com>
On Dec 5, 8:28am, Mikael Magnusson wrote:
}
} Should we perhaps mention array prepending somewhere too?
I suppose, but it's a special case of array slice assignment whereas
append is a whole different assignment operator with special behavior
for associative arrays.
Consequently I think this text ...
} +To prepend to an array, use the syntax (requires that tt(KSH_ARRAYS)
} +and tt(KSH_ZERO_SUBSCRIPT) are not set):
} +ifzman()
} +indent(var(name)tt([)var(1,0)tt(]=LPAR())var(value) ...tt(RPAR()))
... ought to be in "15.2.2 Array Element Assignment" rather than in
the introductory paragraphs in "15.2 Array Parameters". Otherwise
you're introducing subscript assignment syntax without having told
the reader what it means.
Messages sorted by:
Reverse Date,
Date,
Thread,
Author