Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: environment settings
- X-seq: zsh-workers 25192
- From: Stephane Chazelas <Stephane_Chazelas@xxxxxxxx>
- To: zsh-workers@xxxxxxxxxx, Jörg Sommer <joerg@xxxxxxxxxxxx>
- Subject: Re: environment settings
- Date: Tue, 17 Jun 2008 14:26:11 +0100
- In-reply-to: <20080617131154.GM10734@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> <20080617125834.GI5016@xxxxxxxxxxxxxxx> <20080617131154.GM10734@xxxxxxxxxxxxxxxxxxx>
On Tue, Jun 17, 2008 at 03:11:54PM +0200, Vincent Lefevre wrote:
> On 2008-06-17 13:58:34 +0100, Stephane Chazelas wrote:
> > 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.
>
> If scripts I've not written expect that [some program] is available
> in $PATH, then the user may need to add directories to $PATH in his
> .zshenv (e.g. because [some program] has been installed by the user
> himself in his home directory).
[...]
So, you have a script that expects a $PATH that is different
from the system's $PATH, and your solution is to update the
~/.zshenv for every user that is meant to run that script, and
by doing so, possibly affecting the behavior of all the other
zsh scripts that those users may run?
It seems to me that the /right thing/ would be to update the
script (or write a wrapper that sets $PATH if it's a binary file
instead of a script), or update the system's $PATH. But you can
always put it in ~/.zshenv if you can't be bothered or if you
don't have the right to update the system's $PATH.
Moreover, if you do
path+=(/some/path)
in ~/.zshenv, you'll soon end up with /some/path dupplicated.
--
Stéphane
Messages sorted by:
Reverse Date,
Date,
Thread,
Author