From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 27312 invoked from network); 14 May 1999 06:45:07 -0000 Received: from sunsite.auc.dk (130.225.51.30) by ns1.primenet.com.au with SMTP; 14 May 1999 06:45:07 -0000 Received: (qmail 12606 invoked by alias); 14 May 1999 06:44:33 -0000 Mailing-List: contact zsh-workers-help@sunsite.auc.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 6278 Received: (qmail 12599 invoked from network); 14 May 1999 06:44:32 -0000 Date: Fri, 14 May 1999 08:44:30 +0200 (MET DST) Message-Id: <199905140644.IAA00293@beta.informatik.hu-berlin.de> From: Sven Wischnowsky To: zsh-workers@sunsite.auc.dk In-reply-to: Peter Stephenson's message of Thu, 13 May 1999 13:54:45 +0200 Subject: Re: mult_isarr bug Peter Stephenson wrote: > Am I going crazy or is this bug still in the latest version of the shell? > > % dirs > ~z/Src ~z ~/lgt/rz2 ~ ~/lgt/tfuzz /temp/pws ~/lgt/su2/cxx ~/tex/hep-lat > /temp/pws/src > % print ${$(dirs)[1]} > ~ > > Wasn't this just fixed? Oops. No, we have only handled nested parameter expansions, yet. The `fix' for the above would be something like the patch below which makes the result of $(...) be treated as an array if the whole thing is not quoted. I think this is the right behavior, yes? Bye Sven --- os/subst.c Mon May 10 17:23:08 1999 +++ Src/subst.c Fri May 14 08:40:41 1999 @@ -99,6 +99,8 @@ while (!errflag && *str) { if ((qt = *str == Qstring) || *str == String) { if (str[1] == Inpar) { + if (!qt) + mult_isarr = 1; str++; goto comsub; } else if (str[1] == Inbrack) { @@ -249,6 +251,7 @@ * The mult_isarr variable is used by paramsubst() to tell if it yields * * an array. */ +/**/ static int mult_isarr; /**/ -- Sven Wischnowsky wischnow@informatik.hu-berlin.de