From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 16668 invoked from network); 19 Nov 1997 16:58:20 -0000 Received: from math.gatech.edu (list@130.207.146.50) by ns1.primenet.com.au with SMTP; 19 Nov 1997 16:58:20 -0000 Received: (from list@localhost) by math.gatech.edu (8.8.5/8.8.5) id LAA24993; Wed, 19 Nov 1997 11:28:11 -0500 (EST) Resent-Date: Wed, 19 Nov 1997 11:27:48 -0500 (EST) From: "Bart Schaefer" Message-Id: <971119082751.ZM574@candle.brasslantern.com> Date: Wed, 19 Nov 1997 08:27:51 -0800 In-Reply-To: <19971119103756.34168@astaroth.nit.gwu.edu> Comments: In reply to Sweth Chandramouli "path/PATH function" (Nov 19, 10:37am) References: <19971119103756.34168@astaroth.nit.gwu.edu> X-Mailer: Z-Mail (4.0b.820 20aug96) To: Sweth Chandramouli , zsh-users@math.gatech.edu Subject: Re: path/PATH function MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Resent-Message-ID: <"dA6PH.0.p56.3EnSq"@math> Resent-From: zsh-users@math.gatech.edu X-Mailing-List: archive/latest/1146 X-Loop: zsh-users@math.gatech.edu X-Loop: zsh-workers@math.gatech.edu Precedence: list Resent-Sender: zsh-workers-request@math.gatech.edu On Nov 19, 10:37am, Sweth Chandramouli wrote: } Subject: path/PATH function } } i long time ago, i wrote a quick function to take a list of } space-delimited dirs, check to see if each one was currently in my path, } and if not, add it. } [describes cdpath mapping onto CDPATH] } } 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? This "feature" is restricted at present to a few pairs of variables that are hardwired at compile time. They include: CDPATH cdpath FPATH fpath MAILPATH mailpath MANPATH manpath PATH path These are documented in `man zshparam` and in the info files. The remark in the FAQ refers to the desire to provide arbitrary user-defined pairs of variables that behave this way. You might also wish to look into `typeset -U` which causes an array to remove all non-unique elements from itself. A function to test whether any given directory is already in your path shouldn't be necessary. -- Bart Schaefer Brass Lantern Enterprises http://www.well.com/user/barts http://www.brasslantern.com