From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 17879 invoked from network); 23 Aug 2001 07:30:37 -0000 Received: from sunsite.dk (130.225.51.30) by ns1.primenet.com.au with SMTP; 23 Aug 2001 07:30:37 -0000 Received: (qmail 12988 invoked by alias); 23 Aug 2001 07:30:22 -0000 Mailing-List: contact zsh-users-help@sunsite.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 4163 Received: (qmail 12975 invoked from network); 23 Aug 2001 07:30:21 -0000 X-Envelope-Sender-Is: Andrej.Borsenkow@mow.siemens.ru (at relayer goliath.siemens.de) From: Borsenkow Andrej To: martin.ebourne@arcordia.com, zsh-users@sunsite.dk Subject: RE: Zsh Guide chapter 5 (substitutions) Date: Thu, 23 Aug 2001 11:30:10 +0400 Message-ID: <007301c12ba5$70b84fd0$21c9ca95@mow.siemens.ru> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Priority: 3 (Normal) X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook, Build 10.0.2616 In-Reply-To: x-mimeole: Produced By Microsoft MimeOLE V6.00.2479.0006 Importance: Normal > > I don't know if anyone has already pointed this out, but in the user guide > section 5.4.2: > > perl zsh > ----------------------------------------------------------------- > %hash2 = %hash; typeset -A hash2; hash2=(${(kv)hash}) > > Surely this should be hash2=("${(@kv)hash}") in case of empty string > values. > No (at least, if running as zsh): bor@itsrm2% foo=(a "a a" b "b b") bor@itsrm2% print -l $foo a a b b bor@itsrm2% typeset -A bar bor@itsrm2% bar=(${(kv)foo}) bor@itsrm2% print -l $bar a a b b -andrej