From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 15967 invoked from network); 25 Aug 1999 15:15:05 -0000 Received: from sunsite.auc.dk (130.225.51.30) by ns1.primenet.com.au with SMTP; 25 Aug 1999 15:15:05 -0000 Received: (qmail 3598 invoked by alias); 25 Aug 1999 15:14:44 -0000 Mailing-List: contact zsh-workers-help@sunsite.auc.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 7484 Received: (qmail 3590 invoked from network); 25 Aug 1999 15:14:42 -0000 From: "Bart Schaefer" Message-Id: <990825151422.ZM24565@candle.brasslantern.com> Date: Wed, 25 Aug 1999 15:14:22 +0000 In-Reply-To: <199908231200.OAA03141@beta.informatik.hu-berlin.de> Comments: In reply to Sven Wischnowsky "Re: PATCH: completion" (Aug 23, 2:00pm) References: <199908231200.OAA03141@beta.informatik.hu-berlin.de> X-Mailer: Z-Mail (5.0.0 30July97) To: zsh-workers@sunsite.auc.dk Subject: Empty [(I)...] subscripting of assoc arrays (was Re: PATCH: completion) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii I think we now have entirely too many topics going on that all have the subject "Re: PATCH: completion". On Aug 23, 2:00pm, Sven Wischnowsky wrote: } Subject: Re: PATCH: completion } } > This is because "-a" in compadd arguments. It is the result of } > expansion of "dopts[${(@)^dopts[(I)${ws[1][1]}[$uns]]}]" and } > "odopts[${(@)^odopts[(I)${ws[1][1]}[$uns]]}]". } } Ah, sorry, I didn't test it with `[(I)...]'. So I think this is a real } bug, to be fixed in C. I'd like to hear Bart about this, though, } because there was explicit code to turn empty array-subscripts into } non-arrays. Maybe the effect this had on associations subscripted with } `[(I)...]' and `[(R)...]' was pure oversight, though. It was oversight in that I didn't consider it; but either the patch you sent is correct or else it's going to cause a core dump at subst.c:1713 i = 1; /* aval[1] is non-null here */ while (aval[i + 1]) { in some circumstances that I'm not able to predict offhand. I tend to think it'll be OK. -- Bart Schaefer Brass Lantern Enterprises http://www.well.com/user/barts http://www.brasslantern.com