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

Re: ~/.zshenv or ~/.zprofile

On Mon, Aug 04, 2003 at 12:18:58AM +0200, Nikolai Weibull wrote:
> The problem really is that if you put, for example, your PATH
> definition in ~/.zshenv, and have a script or application that
> modifies PATH and later runs a shell, that shell will not use the
> specifically crafted PATH, but will read the standard one from
> ~/.zshenv.

Exactly.  I got bit by this a few years ago when I had a .zshenv file
and was using gdb -- it runs a $SHELL to start the debugged program,
and this overrode some environment values that I did NOT want touched
(ouch).  I now use no .zshenv file at all, and I cannot think of any
good reason for me (or for most typical users) to need one.

I now use .zprofile and .zshrc, and I even have a special line in my
.zshrc file that sources .zprofile if it discovers that .zprofile has
not been sourced yet (which had happened to me in some circumstances
before, but is not a problem in my current situation where I first
login, and then run X Windows).


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