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

Re: Exporting arrays



Adam Spiers wrote:
> % unset foo
> % export foo=(a b c)
> % typeset | grep zzz 
> exported foo='(a b c)'
> 
> Presumably there's a decent reason for this behaviour; would
> someone be good enough to explain it to me?

Geoff explained most of it, but didn't point out that in fact the export
command doesn't create arrays at all, because there's no special syntax
for it:  it just treats "foo=(a b c)" as a string.  (At least, I don't
think he pointed that out.  I've just got back am reading through my
mail rather rapidly.  I've got about 100 different ways of becoming a
millionaire in a month.  This is worse than Reader's Digest.)

-- 
Peter Stephenson <pws@xxxxxx>       Tel: +39 50 911239
WWW:  http://www.ifh.de/~pws/
Gruppo Teorico, Dipartimento di Fisica
Piazza Torricelli 2, 56100 Pisa, Italy



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