Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: path/PATH function
- X-seq: zsh-users 1145
- From: Bruce Stephens <B.Stephens@xxxxxxxxx>
- To: zsh-users@xxxxxxxxxxxxxxx
- Subject: Re: path/PATH function
- Date: Wed, 19 Nov 1997 16:20:40 +0000
- In-reply-to: Your message of "Wed, 19 Nov 1997 10:37:56 EST." <19971119103756.34168@xxxxxxxxxxxxxxxxxxxx>
[I'm reading from zsh-3.1.2, but I think this is the same in 3.0.5]
sweth@xxxxxxxxxxxxxxxxxxxx said:
> cdpath=(. .. ~)
> i hadn't declared $CDPATH anywhere in my .z* files, but echoing
> $CDPATH after login returned
> .:..:/home/sweth/sweth
sweth@xxxxxxxxxxxxxxxxxxxx said:
> i'm assuming that this is some sort of zsh path-addition option, along
> the lines of what i had created; i couldn't find any reference to it
> in the FAQ, however, other than a note in the wish-list for users to
> "be able to create their own foopath/FOOPATH array/path
> combinations." does anyone know anything more about this feature?
Look at the zshparam manpage. cdpath and CDPATH are linked in the same way as
path and PATH. typeset -U may also be relevant: it tells zsh to keep only the
first element of identical copies, and comments that this also works with
special variables like PATH and CDPATH.
Note that there's a typo in the description: should be "For arrays keep only
the first element of each duplication.", not "...duplications". I think,
anyway, perhaps there's a better way to phrase it.
Messages sorted by:
Reverse Date,
Date,
Thread,
Author