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

Re: bug with chpwd/allexport



Dominik Vogt wrote:
>OK, you're right, you can read the manpage this way, but it's just
>implicitly in the description and not stated clearly. And I do not
>understand why the ALLEXPORT option is handled differently in shell
>functions if the auto-exported variables are not visible in the calling
>environment anyway.

You seem to be confusing the concepts of `existing outside the shell
function' and `exported' (visible to programs invoked from the shell).
The two are mostly, though not entirely, independent of each other.
In particular, exporting a variable does nothing to extend its lifetime.

>                    I think it just creates confusion about which
>variables are exported to subshells of the function and which are not?

All variables, exported or not, exist in subshells.

-zefram



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