From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 22409 invoked from network); 8 Sep 2003 15:57:21 -0000 Received: from sunsite.dk (130.225.247.90) by ns1.primenet.com.au with SMTP; 8 Sep 2003 15:57:21 -0000 Received: (qmail 21905 invoked by alias); 8 Sep 2003 15:57:05 -0000 Mailing-List: contact zsh-users-help@sunsite.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 6535 Received: (qmail 21895 invoked from network); 8 Sep 2003 15:57:05 -0000 Received: from localhost (HELO sunsite.dk) (127.0.0.1) by localhost with SMTP; 8 Sep 2003 15:57:05 -0000 X-MessageWall-Score: 0 (sunsite.dk) Received: from [199.67.51.101] by sunsite.dk (MessageWall 1.0.8) with SMTP; 8 Sep 2003 15:57:4 -0000 Received: (from dan@localhost) by dan.emsphone.com (8.12.9/8.12.9) id h88Fv1vE034809; Mon, 8 Sep 2003 10:57:01 -0500 (CDT) (envelope-from dan) Date: Mon, 8 Sep 2003 10:57:01 -0500 From: Dan Nelson To: Wayne Davison , Bart Schaefer , zsh-users@sunsite.dk Subject: Re: ~/.zshenv or ~/.zprofile Message-ID: <20030908155701.GJ48339@dan.emsphone.com> 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> <20030908094540.GB51@DervishD> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20030908094540.GB51@DervishD> X-OS: FreeBSD 5.1-CURRENT X-message-flag: Outlook Error User-Agent: Mutt/1.5.4i In the last episode (Sep 08), DervishD said: > * Dan Nelson dixit: > > 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. > > Well, that was my doubt ;)) > > > path=(/usr/local/bin > > typeset -U PATH > > Good solution! Just one more question: if the user runs, as in the > example, 'PATH=whatever gdb program', this is because the user wants > JUST that path, no more, no less. Shouldn't be a better approach > something like: > > [[ -z "$path" ]] && path=(mypath $path) > typeset -U path That won't work because cron and /usr/bin/login give you a minimal PATH. You could have it test another variable like "NODEFAULTPATH" or something. -- Dan Nelson dnelson@allantgroup.com