From: Bernd Steinhauser <linux@bernd-steinhauser.de>
To: zsh-users@zsh.org
Subject: Re: Gentoo startup bug
Date: Sat, 27 Oct 2012 17:29:11 +0200 [thread overview]
Message-ID: <508BFDC7.6040804@bernd-steinhauser.de> (raw)
In-Reply-To: <CAECNH1RjZKYpcBJLkv1Gu4xaQh=tCRL57yUOmK7gj7TECJfRdg@mail.gmail.com>
On 26/10/12 10:42, Peter Stephenson wrote:
> Without going into the details, there are perfectly good reasons for
> putting your path in .zshenv, such as having the same path in all
> instances of the shell.
Probably. The problem I see is that it might also lead to unexpected behavior,
for example if you run a script using
PATH=/some/path:$PATH zsh -f somescript
If zprofile resets the path, then moving it to zshenv will reset it in any case.
So it might be an improvement if a user really wants to set PATH in .zshenv, but
in other cases, it might make things worse.
I'm not sure about the correct solution. Maybe setting PATH in .zshenv, but only
if it has not been set?
>
> The main point is there's really no good argument for a distribution to trash
> a user's path. You simply can't guess how the many users of many different
> types are going to use the shell. I agree this bit is definitely
> wrong. It's a very
> different argument from, say, a specific site where you expect users to
> conform to a certain way of doing things.
My point was, that simply moving zprofile to zshenv is a bad idea, since zshenv
should be kept very minimalistic and zprofile might do more stuff than just
setting PATH. So even if PATH should be set in zshenv, then maybe the file
should be split up instead. In addition, the problem isn't really "where" PATH
is reset, but that it is reset.
I just wanted to point out that the simplest solution might not be the best
solution.
prev parent reply other threads:[~2012-10-27 15:30 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-10-24 14:25 ☈king
2012-10-24 15:00 ` Damien Thébault
2012-10-24 15:08 ` ☈king
2012-10-25 17:00 ` Bernd Steinhauser
2012-10-26 8:42 ` Peter Stephenson
2012-10-27 15:29 ` Bernd Steinhauser [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=508BFDC7.6040804@bernd-steinhauser.de \
--to=linux@bernd-steinhauser.de \
--cc=zsh-users@zsh.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.vuxu.org/mirror/zsh/
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).