From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 14935 invoked from network); 9 Mar 1999 10:14:06 -0000 Received: from sunsite.auc.dk (130.225.51.30) by ns1.primenet.com.au with SMTP; 9 Mar 1999 10:14:06 -0000 Received: (qmail 927 invoked by alias); 9 Mar 1999 10:13:29 -0000 Mailing-List: contact zsh-workers-help@sunsite.auc.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 5697 Received: (qmail 920 invoked from network); 9 Mar 1999 10:13:26 -0000 Date: Tue, 9 Mar 1999 11:12:42 +0100 (MET) Message-Id: <199903091012.LAA13671@beta.informatik.hu-berlin.de> From: Sven Wischnowsky To: zsh-workers@sunsite.auc.dk In-reply-to: Sven Wischnowsky's message of Tue, 9 Mar 1999 09:19:12 +0100 (MET) Subject: Re: PATCH: small parameter fix I wrote: > With the patch below we get: > > % echo ${$(uname -n)[1]} > beta > % echo "${$(uname -n)[1]}" > b > % echo ${${path}[1]} > /users/wischnow/bin/alpha > % echo "${${path}[1]}" > / > > ...which seems sensible to me. Grrr, this broke "${(@)$(foo)#...}" where the manual says that the thing inside will be treated as an array if the `(@)' flags is given. The patch at least fixes this. But maybe we should collect opinions which expression should expand to what and then make the code produce that. Bye Sven --- os/subst.c Tue Mar 9 11:07:25 1999 +++ Src/subst.c Tue Mar 9 11:10:13 1999 @@ -976,7 +976,8 @@ skipparens(*s, *s == Inpar ? Outpar : Outbrace, &s); sav = *s; *s = 0; - if (multsub(&val, ((quoted || aspar) ? NULL : &aval), &isarr, NULL) && + if (multsub(&val, (((quoted || aspar) && !nojoin) ? NULL : &aval), + &isarr, NULL) && quoted) { isarr = -1; aval = alloc(sizeof(char *)); -- Sven Wischnowsky wischnow@informatik.hu-berlin.de