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

Re: global zlogout and .zlogout

>  >> > I noticed that the global zlogout is not sourced if NORCS is set. I
>  >> > think this is wrong, it should always be executed, just like the
>  >> > global zshenv.
>  >I'm want to know what everyone this is the most usual behavoir.
> Is this a local dialect? :-)

That's what I get for writing e-mail at 2am.  I meant to say I want to know
what everyone thinks is the preferred behavior.

>  >Currently in the zsh baseline, the global zlogout is only
>  >executed for a login shell if NO_RCS is not set and the shell is
>  >interactive.  This is definitely wrong.  My first reaction is to have
>  >the global zlogout always executed (regardless of NO_RCS) when a login
>  >shell is exiting.
> This is exactly what I said above.

Yes, I know.  Just repeating it for emphasis (I like to hear myself talk :-)

>  >This is the way the global zlogin file is handled.
> No, because you can set NO_RCS in your .zshenv. That's why I say above
> "just like the global zshenv", which is the only one that's always
> executed.

I meant to say the global zshenv, not the global zlogin.  But the more I
think about it, I'm no longer happy with this idea.  There should be
someway to suppress the sourcing of the global zlogout.  But you don't
want users to be able to do this.  I believe it was Zoltan who mentioned
sourcing the global zlogout only if the global zlogin was sourced.  That is
easy to do.  Before anything is changed, I would like to know for what
purposes are people using the global zlogout file.

>  >Also, I now realize another potential problem.  When the init scripts
>  >are sourced when the shell is starting up, there is a hack (setting the
>  >sourcelevel to 32768) that prevents an error in these scripts from tripping
>  >ERREXIT.  This same should probably apply to the global zlogout and .zlogout.
> Only to the global one. The user's one is his problem.

ERREXIT is suppressed for all the init script (both global and personal).
Seems like the same should be the case for the global zlogout and .zlogout.


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