Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Bug with associative arrays(?)



Try this:

  % foo=(a b)
  % echo $foo
  a b
  % foo=bar
  % echo $foo
  bar
  % typeset -A foo
  % foo[a]=1
  % foo[b]=2
  % echo $foo
  1 2
  % foo=bar
  % echo $foo
  1 2                   # Oops?
  % echo ${(kv)foo}
  a 1 b 2               # Yes, really.

...or is this the intended behavior? If so, why?

Bye
 Sven


--
Sven Wischnowsky                         wischnow@xxxxxxxxxxxxxxxxxxxxxxx



Messages sorted by: Reverse Date, Date, Thread, Author