zsh-workers
 help / color / mirror / code / Atom feed
From: Zoltan Hidvegi <hzoli@frontiernet.net>
To: stucki@math.fu-berlin.de
Cc: zsh-workers@math.gatech.edu
Subject: Re: Feature / Idea / (a possible option)
Date: Wed, 8 Jul 1998 14:14:13 -0500 (CDT)	[thread overview]
Message-ID: <199807081914.OAA11122@frontiernet.net> (raw)
In-Reply-To: <Pine.GSO.3.95q.980708200939.6079L-100000@petzval> from "C. v. Stuckrad" at "Jul 8, 98 08:19:28 pm"

> 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


      reply	other threads:[~1998-07-08 19:38 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1998-07-08 18:19 C. v. Stuckrad
1998-07-08 19:14 ` Zoltan Hidvegi [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=199807081914.OAA11122@frontiernet.net \
    --to=hzoli@frontiernet.net \
    --cc=stucki@math.fu-berlin.de \
    --cc=zsh-workers@math.gatech.edu \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/zsh/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).