From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 10742 invoked from network); 8 Sep 2003 09:47:46 -0000 Received: from sunsite.dk (130.225.247.90) by ns1.primenet.com.au with SMTP; 8 Sep 2003 09:47:46 -0000 Received: (qmail 25648 invoked by alias); 8 Sep 2003 09:47:31 -0000 Mailing-List: contact zsh-users-help@sunsite.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 6533 Received: (qmail 25634 invoked from network); 8 Sep 2003 09:47:31 -0000 Received: from localhost (HELO sunsite.dk) (127.0.0.1) by localhost with SMTP; 8 Sep 2003 09:47:31 -0000 X-MessageWall-Score: 0 (sunsite.dk) Received: from [195.64.83.12] by sunsite.dk (MessageWall 1.0.8) with SMTP; 8 Sep 2003 9:47:30 -0000 Received: by timix.globnix.org with local id 19wIcM-0004vD-00; Mon, 08 Sep 2003 09:47:30 +0000 Date: Mon, 8 Sep 2003 09:47:29 +0000 From: Phil Pennock To: zsh-users@sunsite.dk Subject: Re: ~/.zshenv or ~/.zprofile Message-ID: <20030908094729.GA13136@globnix.org> Mail-Followup-To: zsh-users@sunsite.dk References: <20030803221858.GA2720@puritan.pcp.ath.cx> <20030803223949.GA18476@binome.blorf.net> <1030804060015.ZM15706@candle.brasslantern.com> <20030907175710.GA28613@binome.blorf.net> <20030907212433.GA233@DervishD> <20030908032728.GH48339@dan.emsphone.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20030908032728.GH48339@dan.emsphone.com> On 2003-09-07 at 22:27 -0500, Dan Nelson wrote: > My global path settings are in zshenv, because that's the only one read > from scripts when your original login shell wasn't zsh and from cron > jobs. Similarly, I want to be able to do: % ssh some-host command-in-company-bin-dir -oPts |less and not have to worry about paths. So I use zshenv, since it's the only pair of files sourced to set variables. If I'm going to worry about things like gdb, then I'll wrap the $path setting inside a $SHLVL test -- if $SHLVL is set and is greater than or equal to 2, then, and only then, assume that $PATH has been set appropriately on this host. Would fail when invoking zsh from a bash shell, were it not that I tend to "exec zsh", which doesn't increase $SHLVL. -- 2001: Blogging invented. Promises to change the way people bore strangers with banal anecdotes about their pets.