On Thu, Aug 12, 2004 at 02:09:44PM -0600, Chris Alvarez wrote:
> I've a question about exporting. In my .bashrc file I have the
> following:
> 
> export ECLIPSE_HOME=/opt/eclipse
> export PATH=$PATH:$ECLIPSE_HOME:.
> 
> if i do that, for some reason the things that I try to append to the
> path get repeated in it.
> 
> > echo$PATH
> /home/calvarez/bin:/usr/local/bin:/usr/bin:/usr/X11R6/bin:/bin:<bla bla
> blah, more stuff>:/opt/eclipse:.:/opt/eclipse:.:/opt/eclipse:.

Here's one possible explanation (I can't verify it for sure, though):
every time Bash is started it inherits the environment of its parent
process.  If you start Bash from within another instance of Bash, you'll
get the effect you described.

I would recommend setting the entire PATH in your .bashrc.  For example,
my .zshrc has the following line:

export 
PATH="/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/network/bin:$HOME/bin:/usr/bin/X11:/usr/games/bin"

-- 
Andrew McNabb
http://www.mcnabbs.org/andrew/
PGP Fingerprint: 8A17 B57C 6879 1863 DE55  8012 AB4D 6098 8826 6868

Attachment: pgpK3Sx7AWWFn.pgp
Description: PGP signature

_______________________________________________
newbies mailing list
[EMAIL PROTECTED]
http://phantom.byu.edu/cgi-bin/mailman/listinfo/newbies

Reply via email to