I have always been annoyed with how a new tab opens in the OSX Terminal. I have my Terminal set to run “source ~/.bashrc” when the application starts. The problem with this is that it won’t run for new tabs, and I use lots of tabs (Rails development, web server, database, ruby console, etc…). And while I have been annoyed, it never really bothered me enough to look for a solution, until today.
As is usually the case, a quick search in Google led me to “Customizing the terminal prompt on Mac“. Apparently, OSX handles the terminal profiles a little differently than what I am used to. OSX uses profiles, where Ubuntu uses .bashrc. So, just add one line in your terminal profile to tell the terminal run the necessary command to load your .bashrc like so:
- First open up your ~/.bash_profile in your text editor of choice
- Add the line “source ~/.bashrc”
- Save and close ~/.bash_profile
Easy as can be! Now set your .bashrc to make your terminal as color-coded and informative as you want it to be. There are a lot of tutorials and information available for editing your .bashrc file.