Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: $PATH
- X-seq: zsh-users 4017
- From: "Bart Schaefer" <schaefer@xxxxxxxxxxxxxxxxxxxxxxx>
- To: Will Yardley <william@xxxxxxxxxxxxxxx>, zsh-users@xxxxxxxxxx
- Subject: Re: $PATH
- Date: Tue, 10 Jul 2001 08:17:43 +0000
- In-reply-to: <20010709222813.B15620@xxxxxxxxxxxxxxx>
- Mailing-list: contact zsh-users-help@xxxxxxxxxx; run by ezmlm
- References: <20010709222813.B15620@xxxxxxxxxxxxxxx>
On Jul 9, 10:28pm, Will Yardley wrote:
} Subject: $PATH
}
} noticed that if i do something like:
} PATH=$PATH:/dh/bin
} or whatever, each time i open a new shell (ie if i type 'zsh') my new shell
} has the arg appended twice
}
} is there a simple solution i'm overlooking here?
Use the `path' array instead of the PATH scalar, and use `typeset -U'.
typeset -U path
path=($path /dh/bin)
Recent versions of zsh, e.g. 3.1.9/4.0.x, also allow `typeset -U' of a
colon-separated scalar like PATH, but the above will work in most 3.0.x
versions as well.
--
Bart Schaefer Brass Lantern Enterprises
http://www.well.com/user/barts http://www.brasslantern.com
Zsh: http://www.zsh.org | PHPerl Project: http://phperl.sourceforge.net
Messages sorted by:
Reverse Date,
Date,
Thread,
Author