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

Re: clone an associative array?



Peter Stephenson wrote:
> > % typeset -A counterfeit
> > % counterfeit=${homemade}
> 
> As it's a sort of array, you need braces.

I meant parentheses, of course.  You've already got the braces.

> typeset -A counterfeit
> counterfeit=(${(kv)homemade})
> 
> Make sure you don't have the option SH_WORD_SPLIT set.  (This is a
> classic example of why it's a good idea to get used to doing without it.)

This is what Stephane's version works around.

pws


**********************************************************************
This email and any files transmitted with it are confidential and
intended solely for the use of the individual or entity to whom they
are addressed. If you have received this email in error please notify
the system manager.

**********************************************************************



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