zsh-users
 help / color / mirror / code / Atom feed
* creating associative arrays
@ 2001-12-11 18:45 Akos Szalkai
  2001-12-12 10:28 ` Peter Stephenson
  2001-12-12 12:30 ` Akos Szalkai
  0 siblings, 2 replies; 5+ messages in thread
From: Akos Szalkai @ 2001-12-11 18:45 UTC (permalink / raw)
  To: zsh-users

Hello,

I am trying to fill an associative array from a file.  If the name of
the file is fixed, e.g. array.txt then the following works:

: ${(AA)dict::=$(<array.txt)}

However, if the filename is given in a parameter then the command:
: ${(AA)dict::=$(<${filename})}
gives the error
zsh: bad set of key/value pairs for associative array.

I guess I am mixing up some kind of expansion order, so could somebody
help?

Thanks in advance,
Akos


^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2001-12-14 16:31 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2001-12-11 18:45 creating associative arrays Akos Szalkai
2001-12-12 10:28 ` Peter Stephenson
2001-12-12 12:13   ` Akos Szalkai
2001-12-12 12:30 ` Akos Szalkai
2001-12-14 16:31   ` Bart Schaefer

Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/zsh/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).