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

Re: bug with chpwd/allexport

> >                        BTW if the second workaround you suggest works,
> >then it is a bug. The manpage states clearly, that a local variable is
> >still exported if the ALLEXPORT option is set and the variable was
> >prviously unset.
> But with `local', the variable disappears at the end of the function,
> and so can't affect the display of the prompt.  Try adding "print -P '%~'"
> in different parts of the function to see where the variable takes effect.

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. I think it just creates confusion about which
variables are exported to subshells of the function and which are not?
Or what is the reason for this?


Dominik Vogt                                 phone:        07031/14-4596
Hewlett-Packard GmbH                           fax:        07031/14-3883
Boeblingen Verification Solutions                                       
Herrenberger Str. 130
71034 Boeblingen                             email:  dominik_vogt@xxxxxx

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