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

Re: Associative Arrays



On Thu, Oct 21, 2004 at 09:40:14AM -0700, Bart Schaefer wrote:
[...]
>    local -A named; set -A named "$@"
[...]

That's not correct as "$@" may have "-x"/"-e" like elements.

ksh has:

set -A named -- "$@"

it doesn't seem to work in zsh 4.2.0.

named=("$@")

is OK though.

-- 
Stephane



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