zsh-workers
 help / color / mirror / code / Atom feed
* Feature / Idea / (a possible option)
@ 1998-07-08 18:19 C. v. Stuckrad
  1998-07-08 19:14 ` Zoltan Hidvegi
  0 siblings, 1 reply; 2+ messages in thread
From: C. v. Stuckrad @ 1998-07-08 18:19 UTC (permalink / raw)
  To: Zsh workers list


Hi!

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 '.').

So now some users complained that a '.login' was *so much* slower
by this external program. One 'zsh' user had a better Idea:

Question:  Might it be a useful option like
	setopt cleanpath
or a Variable with one of the values:
	CLEANPATH={single|enddot|nodot}
or some such thing ???

As you see, just an Idea, but an idea I'd really like to see included,
because a cleaned-up PATH lessens the network searching load on NFS !
(Which is one of our d***dest Problems... and the users often do
something like PATH='the_whole_thing_again':$PATH recurstively in
their profile/zshrc/xstartup/xterm ...)

Your's  Stucki

Christoph von Stuckrad       * *  | talk to  | <stucki@math.fu-berlin.de> \
Freie Universitaet Berlin    |/_* | nickname | ...!unido!fub!leibniz!stucki|
Fachbereich Mathematik, EDV  |\ * | 'stucki' | Tel:+49 30 838-75459        |
Arnimallee 2-6/14195 Berlin  * *  |  on IRC  | Fax:+49 30 838-75454       /



^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: Feature / Idea / (a possible option)
  1998-07-08 18:19 Feature / Idea / (a possible option) C. v. Stuckrad
@ 1998-07-08 19:14 ` Zoltan Hidvegi
  0 siblings, 0 replies; 2+ messages in thread
From: Zoltan Hidvegi @ 1998-07-08 19:14 UTC (permalink / raw)
  To: stucki; +Cc: zsh-workers

> 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


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~1998-07-08 19:38 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1998-07-08 18:19 Feature / Idea / (a possible option) C. v. Stuckrad
1998-07-08 19:14 ` Zoltan Hidvegi

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).