Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: Looking for devious one or two liner solutions to a problem
- X-seq: zsh-users 11987
- From: Peter Stephenson <pws@xxxxxxx>
- To: zsh-users@xxxxxxxxxx
- Subject: Re: Looking for devious one or two liner solutions to a problem
- Date: Thu, 11 Oct 2007 10:02:00 +0100
- In-reply-to: <071010204256.ZM28519@xxxxxxxxxxxxxxxxxxxxxx>
- Mailing-list: contact zsh-users-help@xxxxxxxxxx; run by ezmlm
- Organization: CSR
- References: <20071010163733.7875cee3.elessar@xxxxxxxxxxx> <071010203509.ZM28474@xxxxxxxxxxxxxxxxxxxxxx> <071010204256.ZM28519@xxxxxxxxxxxxxxxxxxxxxx>
On Wed, 10 Oct 2007 20:42:56 -0700
Bart Schaefer <schaefer@xxxxxxxxxxxxxxxx> wrote:
> On Oct 10, 8:35pm, Bart Schaefer wrote:
> } f(){a=(${(s:.:)1});a[$2,3]=($[${a[$2]}+1] 0 0 0);a=${(j:.:)${a[0,3]}}}
>
> Hmm, I may have just found a parser bug. That doesn't work; you need
> one more space or sem between the assignment and the closing brace:
>
> f(){a=(${(s:.:)1});a[$2,3]=($[${a[$2]}+1] 0 0 0);a=${(j:.:)${a[0,3]}};}
I have a vague memory of that being deliberate: the closing brace must
start a separate word on the command line. This is going back years,
however (I think to Zoltan's period in charage). It's possible I'm
remembering some other change to do with braces.
--
Peter Stephenson <pws@xxxxxxx> Software Engineer
CSR PLC, Churchill House, Cambridge Business Park, Cowley Road
Cambridge, CB4 0WZ, UK Tel: +44 (0)1223 692070
Messages sorted by:
Reverse Date,
Date,
Thread,
Author