Terminal not parsing .bashrc?

Discussion in 'macOS' started by iW00t, Jan 4, 2008.

  1. iW00t macrumors 68040

    iW00t

    Joined:
    Nov 7, 2006
    Location:
    Defenders of Apple Guild
    #1
    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?
     
  2. fletchnj macrumors newbie

    Joined:
    Dec 31, 2007
    #2
    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
     

Share This Page