Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: root's path
- X-seq: zsh-users 16903
- From: Mikael Magnusson <mikachu@xxxxxxxxx>
- To: Christian Neukirchen <chneukirchen@xxxxxxxxx>
- Subject: Re: root's path
- Date: Sat, 17 Mar 2012 12:21:23 +0100
- Cc: zsh-users@xxxxxxx
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=8Pbe3YWy68Oz7JQCxRX5YQtYToQKMQTAX9ptj+KA5Ws=; b=uiieK/Sd6YE8xWPf1maVeGfXbg/Zmq9vK6smDmuwYJgZmKZMBm/N55k+7IVzko4jAS gaKB9kbX40JqkLl3B3t/Re7jRKJVcSFRATVdtEAQpLxaEiT07wlhcXpTJGWVvZjnHt4a bOJfm6BJwqaNsq2TYiUaQRkYas8E1sCwI2lAlv/wEFbhpZRcCXeucSt+/mKUudvOB4C+ FVM+884sxuN/9i6SvLFfDLGzOh3ShJl0IdzgrHH/0UWRDCw/l4I2ncovJRo24SYAcBxh 89jWF3fTrDKedZzJ9WQ0o7EP3DQvj1qIZATxim/R8O1rTjkOCu7HQyvvM3rzmCxLS8rU 8bDg==
- In-reply-to: <87r4wr8opa.fsf@gmail.com>
- List-help: <mailto:zsh-users-help@zsh.org>
- List-id: Zsh Users List <zsh-users.zsh.org>
- List-post: <mailto:zsh-users@zsh.org>
- Mailing-list: contact zsh-users-help@xxxxxxx; run by ezmlm
- References: <4F63ECD7.3040109@sergio.spb.ru> <alpine.LNX.2.01.1203170040230.18133__19065.733991056$1331959656$gmane$org@hp.internal> <87r4wr8opa.fsf@gmail.com>
On 17 March 2012 12:13, Christian Neukirchen <chneukirchen@xxxxxxxxx> wrote:
> "Benjamin R. Haskell" <zsh@xxxxxxxxxx> writes:
>
>> On Sat, 17 Mar 2012, sergio wrote:
>>
>>> Hello.
>>>
>>> How zsh sets root's $path (and $PATH)?
>>> bash uses /etc/profile, for sudo completion there are /etc/zsh/zshrc
>>> and $PATH for non root is in /etc/zsh/zshenv. But I can't find root
>>> path anywhere.
>>
>> Zsh often ends up using /etc/profile or the equivalent. On Gentoo,
>> for example, /etc/zsh/zprofile sources /etc/profile.env. On OpenSUSE,
>> /etc/zprofile sources /etc/profile.
>
> Shouldn't $PATH be set in /etc/zshenv rather than zprofile?
> Else, it's impossible to override $PATH in ~/.zshenv.
Absolutely not, if you set PATH from *env, it makes it impossible to
inherit the PATH from the parent process' environment, even in
scripts, which will break a lot of things. The path should only be set
once on login of the current session, ie in zprofile if zsh is your
login shell, otherwise in the startup file for your login shell.
--
Mikael Magnusson
Messages sorted by:
Reverse Date,
Date,
Thread,
Author