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

Re: ~/.zshenv or ~/.zprofile



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.

When I run an interactive zsh, I want my customised environment
from ~/.zshenv regardless of what the parent process was doing.
$SHELL shouldn't be being used for any other purpose; a program that
wants a shell to interpret a command it's just generated should be using
/bin/sh directly, or, if it wants zsh, should be using /usr/bin/zsh -f.

Unfortunately there are many programs that are not well-behaved, and
use $SHELL as a non-interactive command interpreter, expecting it to
interpret some particular shell command language.  With make and procmail
(both of which are badly-behaved in this manner), it is wise to always
explicitly set SHELL=/bin/sh in the configuration file.

-zefram



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