Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: Looking for devious one or two liner solutions to a problem



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