Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: environment settings
- X-seq: zsh-workers 25171
- From: Stephane Chazelas <Stephane_Chazelas@xxxxxxxx>
- To: Jörg Sommer <joerg@xxxxxxxxxxxx>
- Subject: Re: environment settings
- Date: Tue, 17 Jun 2008 10:39:00 +0100
- Cc: zsh-workers@xxxxxxxxxx
- In-reply-to: <slrng5etlu.mft.joerg@xxxxxxxxxxxx>
- Mail-followup-to: Jörg Sommer <joerg@xxxxxxxxxxxx>, zsh-workers@xxxxxxxxxx
- Mailing-list: contact zsh-workers-help@xxxxxxxxxx; run by ezmlm
- References: <20080616074651.GB26165@marcus> <20080616080556.GA5091@xxxxxxxxxxxxxxx> <20080616123045.GC26165@marcus> <20080616124450.GC5091@xxxxxxxxxxxxxxx> <slrng5etlu.mft.joerg@xxxxxxxxxxxx>
On Tue, Jun 17, 2008 at 08:33:02AM +0000, Jörg Sommer wrote:
[...]
> > Which in a way makes sense though is not very useful. ~/.zshrc
> > is your shell configuration file. ~/.zprofile is you session
> > configuration file.
> >
> > Generally, in ~/.zshrc, you put stuff that affects the behavior
> > of interactive shells (sets shell options, defines shell
> > aliases, configure completions).
> >
> > In ~/.zprofile, you define what affects any process started in
> > your session not necessarily only the shell processes.
>
> And what's the meaning of .zshenv? I use it for my environment variables
> like EDITOR, because my session is started by X.
[...]
My understanding is that ~/.zshenv is for hacking in situations
where you can't do otherwise.
Your X login procedure should source your .zprofile or some file
that is sourced by your .zprofile if you want the same settings
in X sessions and non-X sessions. Or it should source/read
another session config file that defines env variables.
.zshenv is to fix up situations where it's not possible in my
opinion. It's like the SHELLOPTS, BASH_ENV variables with bash
or ENV with some kshs, it should be used with extreme care and
probably not permanently.
Now, that's one way to see things. You can have a different
approach where .zshenv is central, but my feeling is that it's
asking for trouble.
--
Stéphane
Messages sorted by:
Reverse Date,
Date,
Thread,
Author