Last Updated: February 25, 2016
·
735
· jisaacks

Customize your command line prompt!

Create a file in your home directory called .prompt and put this in it:

BLUE="\[\033[0;34m\]"
WHITE="\[\e[0m\]"

function my_prompt() {
  prompt="${WHITE}[${BLUE}\w${WHITE}]"
  PS1="\[\033[G\]${prompt}➔ "
}

PROMPT_COMMAND=my_prompt

Now run this command:

echo "source $HOME/.prompt" >> ~/.bash_profile

Now restart your terminal. It will be colored and better looking. The color really helps break up multiple commands.

This is only scratching the surface of what you can do. My current setup also shows me my current git branch and other info about my current repo.