Open ~/.bash_profile in your favorite editor and add the following content to the bottom.
# Git branch in prompt.
parse_git_branch() {| // setIntervalTimeout sits somewhere between setTimeout and setInterval, | |
| // allowing a finite or infinite number of fixed or variadic intervals. | |
| // Returns a cleanup function to clear the current timeout. | |
| // Note: IE does not support generators. | |
| function setIntervalTimeout(callback, iterable, ...args){ | |
| if (!(Symbol.iterator in iterable)){ | |
| throw new Error(`Expected valid iterable. Received: ${iterable}.`); |