Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Nasty bug in array-element typeset assignments
- X-seq: zsh-workers 15491
- From: "Bart Schaefer" <schaefer@xxxxxxxxxxxxxxxxxxxxxxx>
- To: zsh-workers@xxxxxxxxxx
- Subject: Nasty bug in array-element typeset assignments
- Date: Thu, 26 Jul 2001 05:13:01 +0000
- Mailing-list: contact zsh-workers-help@xxxxxxxxxx; run by ezmlm
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
Messages sorted by:
Reverse Date,
Date,
Thread,
Author