Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: environment settings
- X-seq: zsh-workers 25188
- From: Stephane Chazelas <Stephane_Chazelas@xxxxxxxx>
- To: zsh-workers@xxxxxxxxxx, Jörg Sommer <joerg@xxxxxxxxxxxx>
- Subject: Re: environment settings
- Date: Tue, 17 Jun 2008 13:58:34 +0100
- In-reply-to: <20080617104126.GC10734@xxxxxxxxxxxxxxxxxxx>
- Mail-followup-to: zsh-workers@xxxxxxxxxx, Jörg Sommer <joerg@xxxxxxxxxxxx>
- 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> <20080617093859.GB5016@xxxxxxxxxxxxxxx> <20080617104126.GC10734@xxxxxxxxxxxxxxxxxxx>
On Tue, Jun 17, 2008 at 12:41:26PM +0200, Vincent Lefevre wrote:
> 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.
[...]
And I still think that would be a dirty hack and asking for trouble.
Changing the behavior of every zsh instance, even the instances
that run script that you've not written is very bad practice
IMO especially when you consider that the behavior is only
affected for the processes that have your euid.
So, it has its uses, but mainly for non-normal operation, when
you can't be bothered or don't have the right to do the /right
thing/.
--
Stéphane
Messages sorted by:
Reverse Date,
Date,
Thread,
Author