From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 23360 invoked by alias); 17 Jan 2013 14:59:09 -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: 17578 Received: (qmail 12238 invoked from network); 17 Jan 2013 14:59:07 -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,RCVD_IN_DNSWL_NONE autolearn=ham version=3.3.2 Received-SPF: none (ns1.primenet.com.au: domain at closedmail.com does not designate permitted sender hosts) From: Bart Schaefer Message-id: <130117065847.ZM23286@torch.brasslantern.com> Date: Thu, 17 Jan 2013 06:58:47 -0800 In-reply-to: <36715347.6JBz4RFEZ9@horus> Comments: In reply to Florian Lindner "Re: Invocation of zshenv" (Jan 17, 10:23am) References: <28298170.euN6CzUU1l@horus> <20130115130247.6c04e610@pwslap01u.europe.root.pri> <36715347.6JBz4RFEZ9@horus> X-Mailer: OpenZMail Classic (0.9.2 24April2005) To: zsh-users@zsh.org Subject: Re: Invocation of zshenv MIME-version: 1.0 Content-type: text/plain; charset=us-ascii On Jan 17, 10:23am, Florian Lindner wrote: } } So [/etc/profile] sets and exports the PATH but does not take a } already set PATH variable into account. If .zshenv is sourced before } /etc/profile that would explain it. But why only on SSH shells not on } usual shells? How do you typically create a "usual shell"? Log in on console, or open a terminal window on a graphical desktop? If the latter, it's possible that ssh shells are being invoked as login shells whereas "usual" shells are not. This will depend on the configuration of the terminal emulator. Try putting setopt NO_GLOBAL_RCS in your .zshenv to see if that suppresses /etc/profile. However, you may not want that in general, depending on what other environment the global init files are establishing for you. Instead you may simply need to reset the path again in a later file. I put my path-setting logic in an extra file which is "source"d from both .zshenv and .zlogin (first and last files sourced at startup). This also has the advantage of making it easier to customize the path to each local host.