From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 18769 invoked from network); 8 Jul 1998 19:38:03 -0000 Received: from math.gatech.edu (list@130.207.146.50) by ns1.primenet.com.au with SMTP; 8 Jul 1998 19:38:03 -0000 Received: (from list@localhost) by math.gatech.edu (8.8.5/8.8.5) id PAA05335; Wed, 8 Jul 1998 15:13:05 -0400 (EDT) Resent-Date: Wed, 8 Jul 1998 15:13:05 -0400 (EDT) From: Zoltan Hidvegi Message-Id: <199807081914.OAA11122@frontiernet.net> Subject: Re: Feature / Idea / (a possible option) In-Reply-To: from "C. v. Stuckrad" at "Jul 8, 98 08:19:28 pm" To: stucki@math.fu-berlin.de Date: Wed, 8 Jul 1998 14:14:13 -0500 (CDT) Cc: zsh-workers@math.gatech.edu X-Mailer: ELM [version 2.4ME+ PL35 (25)] MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Resent-Message-ID: <"lX79-3.0.IJ1.1Jyer"@math> Resent-From: zsh-workers@math.gatech.edu X-Mailing-List: archive/latest/4215 X-Loop: zsh-workers@math.gatech.edu Precedence: list Resent-Sender: zsh-workers-request@math.gatech.edu > We use a little Program called 'dotpath', to cleanup PATHes like > export PATH=$(dotpath) > where 'dotpath' prints the Path cleaned up from duplicate entries > puts the '.' directory at the end (in case of 'root' accounts > or 'wheel' group it even eliminates the '.'). How about typeset -U path PATH? That makes the path unique. Every assignment after that will keep the path unique, so PATH=$PATH:$PATH will leave the path unchanged. To move the dot to the end, do path=( "${path[@]:#.}" . ) To remove the dot, you can do: path[(r).]=() Zoli