From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 133 invoked from network); 22 Jun 1999 17:36:59 -0000 Received: from sunsite.auc.dk (130.225.51.30) by ns1.primenet.com.au with SMTP; 22 Jun 1999 17:36:59 -0000 Received: (qmail 15481 invoked by alias); 22 Jun 1999 17:36:46 -0000 Mailing-List: contact zsh-workers-help@sunsite.auc.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 6791 Received: (qmail 15473 invoked from network); 22 Jun 1999 17:36:43 -0000 From: "Bart Schaefer" Message-Id: <990622173628.ZM30363@candle.brasslantern.com> Date: Tue, 22 Jun 1999 17:36:28 +0000 In-Reply-To: <007a01bebcca$33379950$21c9ca95@mow.siemens.ru> Comments: In reply to "Andrej Borsenkow" "Possible bug with ${(A)foo=} and ${(AA)foo=}" (Jun 22, 8:13pm) References: <007a01bebcca$33379950$21c9ca95@mow.siemens.ru> X-Mailer: Z-Mail (5.0.0 30July97) To: "Andrej Borsenkow" , "ZSH workers mailing list" Subject: Re: Possible bug with ${(A)foo=} and ${(AA)foo=} MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii On Jun 22, 8:13pm, Andrej Borsenkow wrote: } Subject: Possible bug with ${(A)foo=} and ${(AA)foo=} } } While playing with something else I discovered, that it is impossible to } create empty array with this form and it is impossible to create hash in } this way without error message: The first problem is what causes the second, though creating an empty AA this way would create an empty hash table (normally the hash table is not created until the AA has at least one value). } I think, that if ${foo=} is valid at all, then we must distinguish between } no value and empty value. I've been looking at this ... we can distinguish between ${x=} and ${x=''}, but without jumping through a lot of hoops we can't distinguish whether $y is set or unset in ${x=$y}. Perhaps that doesn't matter ... Anyway, I've just run out of time to work on this, so a patch will have to wait unless someone else gets to it. } It is the same as in command line (and, after all, we } compute it using the same rules?) I'm not sure what you mean by that, but we don't parse it with the same code. } [Background - ${(AA)foo=} seems currently to be the only way to create } global hash from within Zsh function] Hmm, yes, that does seem to be an issue. -- Bart Schaefer Brass Lantern Enterprises http://www.well.com/user/barts http://www.brasslantern.com