<sdomi>
not necessarily proud of this code, but I didn't find any better way that would preserve the indice names
<isabella>
you want eval
<dakkar>
thing="$(declare -p $nested_ref)";eval "${thing//declare -A $nested_ref/declare -g -A _$nested_id}"
<dakkar>
(vaguely tested)
<sdomi>
eval pains me
<isabella>
you want source <(echo ...)
<isabella>
what you wrote is an eval sdomi
<sdomi>
eh, i suppose
<sdomi>
not sure how much I trust `declare -p` after i've seen it badly mangle some arrays with special characters (that could be otherwise accessed just fine)
<dakkar>
oh, you've seen worse horrors than me then
<dakkar>
(I'm usually the one *generating* the horrors…)
<sdomi>
sadly no example on hand, but that was back when i was hacking on a test harness that generated random data
<sdomi>
curiously, doing this straight up with eval reverses the indice order for me <.<
<sdomi>
i'm not relying on that anywhere, but it's funny to see
<dakkar>
associative arrays are not ordered, are they?
<sdomi>
they're ordered on an internal hash of something
<sdomi>
beyond that, not really
<dakkar>
yeah, so "reverses the order" is a special case of "the order is unpredictable", right?
<sdomi>
more or less :p
dakkar has quit [Ping timeout: 246 seconds]
<sdomi>
i have been informed of the following trick by Maja: