From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 15824 invoked from network); 7 Jul 1999 15:50:40 -0000 Received: from sunsite.auc.dk (130.225.51.30) by ns1.primenet.com.au with SMTP; 7 Jul 1999 15:50:40 -0000 Received: (qmail 3198 invoked by alias); 7 Jul 1999 15:50:31 -0000 Mailing-List: contact zsh-workers-help@sunsite.auc.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 7018 Received: (qmail 3191 invoked from network); 7 Jul 1999 15:50:31 -0000 X-Envelope-Sender-Is: Andrej.Borsenkow@mow.siemens.ru (at relayer david.siemens.de) From: "Andrej Borsenkow" To: "ZSH workers mailing list" Subject: RE: ${(A)=xxx} - second go - now real bug. Date: Wed, 7 Jul 1999 19:50:28 +0400 Message-ID: <002601bec890$6fc415c0$21c9ca95@mow.siemens.ru> MIME-Version: 1.0 Content-Type: text/plain; charset="koi8-r" Content-Transfer-Encoding: 7bit X-Priority: 3 (Normal) X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook IMO, Build 9.0.2416 (9.0.2910.0) In-Reply-To: <002501bec88d$f467f470$21c9ca95@mow.siemens.ru> Importance: Normal X-MimeOLE: Produced By Microsoft MimeOLE V5.00.2314.1300 > > ${foo=bar} - the same as foo=bar (with blanks quoted, 'course) > ${(A)foo=bar}, ${(AA)foo=bar} - > the same as foo=(bar) > Some more question. Documentation says "word". It prohibits ${foo=bar baz} because ``bar baz'' is not a word. Either documentation or shell should be corrected :-) Assuming that blanks are valid, I _do_ mean ${(A)foo=$bar $baz} should be the same as foo=($bar $baz): bor@itsrm2:~%> foo='bar baz' bor@itsrm2:~%> bar='baz bad' bor@itsrm2:~%> baz=($foo $bar) bor@itsrm2:~%> print -l $baz bar baz baz bad Note, that neither $foo nor $bar are word splitted. It is not the same, as first compute ``$foo $bar'' and split it. If blanks are not valid - then it is much more simple. We only have to make sure that arrays are preserved and not converted to scalars. How is ``bar'' in "${(A)foo=bar}" interpreted? Is it quoted or not? That is important to decide, what value ``foo'' gets (but the value of substitution won't change :-) /andrej