Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: ~/.zshenv or ~/.zprofile
- X-seq: zsh-users 6533
- From: Phil Pennock <phil.pennock@xxxxxxxxxxx>
- To: zsh-users@xxxxxxxxxx
- Subject: Re: ~/.zshenv or ~/.zprofile
- Date: Mon, 8 Sep 2003 09:47:29 +0000
- In-reply-to: <20030908032728.GH48339@xxxxxxxxxxxxxxxx>
- Mail-followup-to: zsh-users@xxxxxxxxxx
- Mailing-list: contact zsh-users-help@xxxxxxxxxx; run by ezmlm
- References: <20030803221858.GA2720@xxxxxxxxxxxxxxxxxx> <20030803223949.GA18476@xxxxxxxxxxxxxxxx> <1030804060015.ZM15706@xxxxxxxxxxxxxxxxxxxxxxx> <20030907175710.GA28613@xxxxxxxxxxxxxxxx> <20030907212433.GA233@DervishD> <20030908032728.GH48339@xxxxxxxxxxxxxxxx>
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. <http://www.thelemon.net/issues/timeline.php>
Messages sorted by:
Reverse Date,
Date,
Thread,
Author