-   Linux - Newbie (
-   -   Sourcing .bashrc (

shifty_eyes 09-25-2005 05:05 PM

Sourcing .bashrc
In my ~/.bashrc I have a line to modify my PATH shell variable as follows

Now any time I change a different part of the script and source it to update the changes my PATH (which has already been updated when i launched the terminal) gets updated again, so i have /home/shifty/bin:/home/shifty/bin:$PATH:.:.

Is there any elegant way around this or do I have to specify an absolute PATH?


Tinkster 09-25-2005 05:55 PM

Close the parent shell and open a new one :}

Honestly, why would you keep sourcing ~/.bashrc from the
same shell?


foo_bar_foo 09-25-2005 10:42 PM

there is just no way around that one short of making that PATH change global
or more to the point testing your .bashrc script changes from a file other than .bashrc

in reality even though it feels funky it's just not a problem

IBall 09-25-2005 10:43 PM

If you use ~/.bash_profile for setting environment variables, it is only done when you log in. I have found that this only seems to work if you have a text login though...


All times are GMT -5. The time now is 04:02 AM.