From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 24099 invoked by alias); 27 Oct 2012 15:30:12 -0000 Mailing-List: contact zsh-users-help@zsh.org; run by ezmlm Precedence: bulk X-No-Archive: yes List-Id: Zsh Users List List-Post: List-Help: X-Seq: 17356 Received: (qmail 18715 invoked from network); 27 Oct 2012 15:30:00 -0000 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on f.primenet.com.au X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00 autolearn=ham version=3.3.2 Received-SPF: none (ns1.primenet.com.au: domain at bernd-steinhauser.de does not designate permitted sender hosts) Message-ID: <508BFDC7.6040804@bernd-steinhauser.de> Date: Sat, 27 Oct 2012 17:29:11 +0200 From: Bernd Steinhauser User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:15.0) Gecko/20120917 Thunderbird/15.0.1 MIME-Version: 1.0 To: zsh-users@zsh.org Subject: Re: Gentoo startup bug References: <5087FA6E.4070504@sharpsaw.org> <50880489.1030509@sharpsaw.org> <50897049.9040708@bernd-steinhauser.de> In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit 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.