Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: ~/.zshenv or ~/.zprofile
- X-seq: zsh-users 6535
- From: Dan Nelson <dnelson@xxxxxxxxxxxxxxx>
- To: Wayne Davison <wayned@xxxxxxxxxxxxxxxxxxxxx>, Bart Schaefer <schaefer@xxxxxxxxxxxxxxxx>, zsh-users@xxxxxxxxxx
- Subject: Re: ~/.zshenv or ~/.zprofile
- Date: Mon, 8 Sep 2003 10:57:01 -0500
- In-reply-to: <20030908094540.GB51@DervishD>
- 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> <20030908094540.GB51@DervishD>
In the last episode (Sep 08), DervishD said:
> * Dan Nelson <dnelson@xxxxxxxxxxxxxxx> 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@xxxxxxxxxxxxxxx
Messages sorted by:
Reverse Date,
Date,
Thread,
Author