path keeps bloating with repeated entries on invoking subshells



In my tcshell I used to follow the construct:

set path=(./ ~/bin/ ~/bin/foocmds [snip]........ $path)

I thought this was the right way to go since I only append to the
systemwide path settings without overwriting anything as a user.

But yesterday I got a "word too long error" and on investigation I find
that each time I invoke a subshell (say, I made a change to the .cshrc or
added a new script to the bin) I find that the path keeps bloating up with
duplicate entries (I guess a side-effect of appending the $path at the
end).

Is there a smart-way around this?

--
Rahul
.



Relevant Pages