Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: environment settings
- X-seq: zsh-workers 25194
- From: Stephane Chazelas <Stephane_Chazelas@xxxxxxxx>
- To: Mikael Magnusson <mikachu@xxxxxxxxx>
- Subject: Re: environment settings
- Date: Tue, 17 Jun 2008 15:25:57 +0100
- Cc: zsh-workers@xxxxxxxxxx
- In-reply-to: <237967ef0806170628m56b80d3anaf252e68ad6c497d@xxxxxxxxxxxxxx>
- Mail-followup-to: Mikael Magnusson <mikachu@xxxxxxxxx>, zsh-workers@xxxxxxxxxx
- Mailing-list: contact zsh-workers-help@xxxxxxxxxx; run by ezmlm
- References: <20080616080556.GA5091@xxxxxxxxxxxxxxx> <20080616123045.GC26165@marcus> <20080616124450.GC5091@xxxxxxxxxxxxxxx> <slrng5etlu.mft.joerg@xxxxxxxxxxxx> <20080617093859.GB5016@xxxxxxxxxxxxxxx> <20080617104126.GC10734@xxxxxxxxxxxxxxxxxxx> <20080617125834.GI5016@xxxxxxxxxxxxxxx> <20080617131154.GM10734@xxxxxxxxxxxxxxxxxxx> <20080617132611.GL5016@xxxxxxxxxxxxxxx> <237967ef0806170628m56b80d3anaf252e68ad6c497d@xxxxxxxxxxxxxx>
On Tue, Jun 17, 2008 at 03:28:20PM +0200, Mikael Magnusson wrote:
> 2008/6/17 Stephane Chazelas <Stephane_Chazelas@xxxxxxxx>:
> > Moreover, if you do
> >
> > path+=(/some/path)
> > in ~/.zshenv, you'll soon end up with /some/path dupplicated.
>
> typeset -U path
[...]
Changing the type of $path in ~/.zshenv, that is for all zsh
shells (including script interpreters) that this user may run
seems dangerous to me.
Some scripts might expect $path[-1] to be the last component
that they added for instance.
Like:
path+=("$(some-cmd)") && print -ru2 just added $path[-1] to PATH
If something changed the type of $path behind its back, then the
above won't work correctly.
--
Stéphane
Messages sorted by:
Reverse Date,
Date,
Thread,
Author