Fancy Shell Prompts

Fancy shell prompts are not just pretty, they’re also incredibly practical. With the powerline prompt, you’ll always know what branch your working on, if there are any uncommitted changes and the exit code of the last command.

Powerline Shell (bash)

This is how to get a fancy shell prompt like the one below for the bash shell.

Example of Powerline Shell Prompt

Install powerline

We’ll use the powerline port for bash.

git clone [email protected]:milkbikis/powerline-shell.git powerline-shell
cd powerline-shell/

Configure Bashrc

Add the following to your ~/.bashrc file. Somewhere near the bottom will be perfect.


function _update_ps1() {
  PS1="$(~/powerline-shell/  --cwd-mode fancy --shell bash $? 2> /dev/null)"

if [ "$TERM" != "linux" ]; then

Install iTerm2

Go here:

Download & Install

Install font package

git clone [email protected]:powerline/fonts.git powerline-fonts
cd powerline-fonts/