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

Re: Bug#526924: zparseopts: should use lists as values in assoc array



also sprach Clint Adams <schizo@xxxxxxxxxx> [2009.05.05.1805 +0200]:
> Unfortunately we don't handle arrays as values of associate arrays
> (yet?) but you can do something like

Aha.

pulse:~|master|% declare -A foo; foo[Clint]=(1 2 3)
zsh: foo: attempt to set slice of associative array

:(

> set -- -a1 -a2; zparseopts 'a+:=arr'; print -l $arr
> 
> although this seems to set arr=(1 -a 2), which is not what I
> expected to happen.

Yeah, that's a bit weird, isn't it? Should I clone the bug?

As for the original bug, maybe just insering $IFS[0] between
elements would do?

-- 
 .''`.   martin f. krafft <madduck@xxx>      Related projects:
: :'  :  proud Debian developer               http://debiansystem.info
`. `'`   http://people.debian.org/~madduck    http://vcs-pkg.org
  `-  Debian - when you have better things to do than fixing systems

Attachment: digital_signature_gpg.asc
Description: Digital signature (see http://martin-krafft.net/gpg/)



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