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

Re: env variables



Geoff Wing writes:
> Nik Gervae <Nik@xxxxxxx> typed:
> :> Arrays aren't exported, because there's no standard or de facto method of
> :> exporting arrays, so nothing would understands them.  Only strings are
> :> exported.  From your example, CDPATH is a string, cdpath is an array.
> :Hmm. That sounds slightly fishy in that csh happily exports array
> :variables, but then csh is bogus in so many ways.... I've managed
> 
> Not as arrays.  In fact, I can't see it doing it at all.
> [...]
>     but PATH is a colon separated string.  path is a space separated string
>     which is pretending to be an array.  You could export it as such but it
>     would be useless.  What happens when an element in the array has a space
>     in it?

That's exactly right. csh happily exports the variable as it would print its
contents, minus the parentheses. At this point I'm more inclined to think
that the program that's getting such an environment variable is making a
serious mistake than to think that zsh is defective.

--Nik



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