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

2009-05-05 Thread martin f krafft
retitle 526924 zparseopts: separate options in also sprach Bart Schaefer [2009.05.05.1905 +0200]: > The parameter is set to (-a 1 -a 2), but "print -l $arr" is consuming > the first -a as an option to print. Confirmed. This leaves the question of whether something could be used to separated the

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

2009-05-05 Thread Bart Schaefer
On May 5, 4:05pm, Clint Adams wrote: } } 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. The parameter is set to (-a 1 -a 2), but "print -l $arr" is consuming the first -a as an option to print. -- To

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

2009-05-05 Thread martin f krafft
also sprach Clint Adams [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; zparseo

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

2009-05-05 Thread Clint Adams
On Mon, May 04, 2009 at 03:01:24PM +0200, martin f krafft wrote: > piper:~|master|% set -- -a1 -a2; zparseopts -A arr a+:; echo $arr[-a] > 12 > > Unfortunately, this greatly reduces the usefulness of the builtin, > since it's impossible to tell from the hash value whether the > options where -a1 -

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

2009-05-04 Thread martin f krafft
Package: zsh-beta Version: 4.3.9-dev-3+20090425-1 Severity: wishlist piper:~|master|% set -- -a1 -a2; zparseopts -A arr a+:; echo $arr[-a] 12 Unfortunately, this greatly reduces the usefulness of the builtin, since it's impossible to tell from the hash value whether the options where -a1 -a2 or -