I recently got a new MacBook Pro and am finally starting to get the hang of it. One of the irksome things I noticed was that in terminal, my .bashrc file wasn’t getting sourced initially. I could source it myself, but that seemed a bit ridiculous.
The reason this was happening is that bash in terminal was looking in the .profile file, not .bashrc. The simple fix here is to tell bash to look for .bashrc when it looks through .profile. Here’s the simple bit of code to do this:
if [ -f ~/.bashrc ]; then . ~/.bashrc fi
If you’d like a little more information about what you can do with .bashrc, take a look at this post I did a while back about my .bashrc file that I use.