From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 11441 invoked from network); 26 Jul 2001 07:02:55 -0000 Received: from sunsite.dk (130.225.51.30) by ns1.primenet.com.au with SMTP; 26 Jul 2001 07:02:55 -0000 Received: (qmail 28748 invoked by alias); 26 Jul 2001 05:16:10 -0000 Mailing-List: contact zsh-workers-help@sunsite.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 15491 Received: (qmail 28737 invoked from network); 26 Jul 2001 05:16:09 -0000 From: "Bart Schaefer" Message-Id: <1010726051301.ZM19183@candle.brasslantern.com> Date: Thu, 26 Jul 2001 05:13:01 +0000 X-Mailer: Z-Mail (5.0.0 30July97) To: zsh-workers@sunsite.dk Subject: Nasty bug in array-element typeset assignments MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Change `foo' to a special such as `path' in the `oops' function below, and you get a lovely core dump. The `local' expression actually changes the scope of the existing variable! zagzig% functions oops oops () { local 'foo[1]'=X echo $foo } zagzig% foo=({0..10}) zagzig% echo $foo 0 1 2 3 4 5 6 7 8 9 10 zagzig% oops X 1 2 3 4 5 6 7 8 9 10 zagzig% echo $+foo 0 -- Bart Schaefer Brass Lantern Enterprises http://www.well.com/user/barts http://www.brasslantern.com Zsh: http://www.zsh.org | PHPerl Project: http://phperl.sourceforge.net