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

Re: environment settings



On 2008-06-17 10:39:00 +0100, Stephane Chazelas wrote:
> My understanding is that ~/.zshenv is for hacking in situations
> where you can't do otherwise.

I completely disagree. ~/.zshenv is useful to define environment
variables when the first zsh shell isn't always a login shell, in
which case ~/.zprofile isn't read (e.g. when the user's main shell
is not zsh and zsh is executed from that shell, or when one uses
ssh + command; the user shouldn't be forced to use the -l flag).
This is also better than the ~/.zprofile when the user often
changes his config files and doesn't want to logout and login
again (meaning quitting the X session...).

Moreover ~/.zshenv is useful to define things that are not exported,
such as shell variables, named directories and so on, that can also
be used in non-interactive shells.

-- 
Vincent Lefèvre <vincent@xxxxxxxxxx> - Web: <http://www.vinc17.org/>
100% accessible validated (X)HTML - Blog: <http://www.vinc17.org/blog/>
Work: CR INRIA - computer arithmetic / Arenaire project (LIP, ENS-Lyon)



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