Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

iW00t

macrumors 68040
Original poster
Nov 7, 2006
3,286
0
Defenders of Apple Guild
I have been setting some environmental variables within the file ~/.bashrc, but it seems like it is not automatically loading the contents of this file each time I open a new terminal window, I have to manually type in source ~/.bashrc in order to get my variables imported.

Is there a way to make it automatic?
 
I have been setting some environmental variables within the file ~/.bashrc, but it seems like it is not automatically loading the contents of this file each time I open a new terminal window, I have to manually type in source ~/.bashrc in order to get my variables imported.

Is there a way to make it automatic?

what does your .bash_profile look like? I just set mine up with the following in my .bash_profile, and it's working.

if [ -f ~/.bashrc ]; then
. ~/.bashrc
fi

export PS1='\[\e[0;31m\]\u\[\e[0m\]\[\e[1;31m\]@\[\e[0m\]\[\e[0;31m\]\H\[\e[0m\] \w $ '
source ~/.bashrc
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.