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

Re: Problem with an exported array

    Hi Oliver :)

 * Oliver Kiddle <okiddle@xxxxxxxxxxx> dixit:
> >     then 'man' works OK. Am I doing something wrong or is just that
> > arrays cannot be exported? BTW I'm using zsh 4.0.7
> Arrays cannot be exported.

    Oh :((( So I'm stuck with the ${= notation, I suppose. Or maybe I
can use two variables, one scalar for programs that want PAGER in
their environment, like man, and other for use interactively, when
manually write '|$PAGER', which will be an array. I'll try to choose
sensible names...

    BTW, is this noted in the manual? I've missed it if so.

> Not so much a zsh limitation as a limitation in the way Unix stores
> the environment.

    I was thinking about it: how the heck does zsh to store a
specially formatted variable, like an array is, in the standard
environment so the programs which use it doesn't get confused?
> There are hacks which could allow us to represent arrays in it but not
> in a way programs like man could be expected to understand.

> ksh (88 and 93) seem to export just the first element for an exported
> array so you might argue we should do that.

    No, I won't ;)) I don't thing that storing just the first element
is a good idea. If you declare an array is quite possible that you
want all items ;).

    Thanks a lot for the answer :)

    Raúl Núñez de Arenas Coronado

Linux Registered User 88736
http://www.pleyades.net & http://raul.pleyades.net/

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