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

Re: Variable namespaces, goals for ZLE, etc.

On Jun 10,  7:01pm, Zefram wrote:
} Subject: Re: Variable namespaces, goals for ZLE, etc.
} Bart Schaefer wrote:
} >I've used versions of sh that would mangle the environment and/or issue
} >warning messages if there were any strings present where the stuff to
} >the left of the `=' contained characters other than [A-Z][a-z][0-9]_.
} We could do a configure test for that.  Perhaps if the local sh does
} complain, we could import/export using munged names starting with
} "__ZSH__" or something like that.

It'd be much better to do the same thing everywhere.  Consider a user who
can't change his shell to be zsh, but who wants to export the ZDOTDIR
variable from his "regular" shell before exec'ing zsh.  It'd be nice if
zsh always imported it from the same name, regardless of platform and
regardless of what it later called it internally.

} Alternatively, we keep things simple, and just don't import/export
} special variables on platforms that really can't handle it -- there
} can't be many of them, surely?

Depends on what you mean by "many."  IIRC, the sh on a Sun platform was
among those that issued the complaints.  (I forget now what OS version.)
It could be a "few platforms, but many installations" kind of thing.

Now, for truly "special" parameters it may not make any difference whether
they can be exported (and if it doesn't, again we should be consistent and
never export them on any platform).  But for "ordinary" parameters that
happen to be used by zsh in a predefined way, lack of export may be quite
a drawback.

Bart Schaefer                                 Brass Lantern Enterprises
http://www.well.com/user/barts              http://www.brasslantern.com

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