The purpose of a `.bashrc` file is to provide a place where you can set up variables, functions and aliases, define your (PS1) prompt and define other settings that you want to use every start you open a new terminal window.

It works by being run each time you open up a new terminal, window or pane.

You can see mine here:![enter image description here][1]

Explanation:

1. Set up my history file to ignore duplicates and be much larger than the default.
2. Color option for `ls` depending on if you are using linux or OSX
3. Function "`md`" to make and cd into a directory with one command
4. Find the current git branch if in a git repo and...
5. -9. Define an awesome PS1 prompt, as in ![enter image description here][2]
10. Improved PS2 prompt
11. Set vi as the editor at the command line
12. Set vi as the default editor
13. execute my 1.bash_aliases1 if it exists
14. Execute my git tab completion script (for remotes and branches) if it exists.
15. Execute autojump if it exists
16. Allow cd'ing without typing the cd part if the bash version >= 4
17. Execute a bash completion script if it exists
18. Use TMUX if it is present
19. Add rvm to my PATH
20. Use rvm if it exists.

I've made this portable so that it works on any of my linux or OSX machines without customization - hence a number of tests for presence are done before using certain functions and other scripts. This also makes it easier to use the entire file immediately on a new machine without having issues that affect
opening a new terminal window.
 [1]: https://i.sstatic.net/DQnGN.png
 [2]: https://i.sstatic.net/slR41.png