Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Is there an idiom for converting an array to an associative array?
- X-seq: zsh-workers 19379
- From: Matt Armstrong <matt@xxxxxxxxxx>
- To: zsh-workers@xxxxxxxxxx
- Subject: Is there an idiom for converting an array to an associative array?
- Date: Thu, 15 Jan 2004 09:05:05 -0800
- Mailing-list: contact zsh-workers-help@xxxxxxxxxx; run by ezmlm
I'm looking for an idiom that will convert the array (a b c) into
(a "" b "" c "") so I can assign it easily to an associative array.
Right now I've got ugliness like this:
array=(a b c)
set -A assoc
for i in $array; do
assoc[$i]=""
done
Any pointers?
--
matt
Messages sorted by:
Reverse Date,
Date,
Thread,
Author