Skip to content

Instantly share code, notes, and snippets.

@Dispader
Created June 10, 2014 19:31
Show Gist options
  • Select an option

  • Save Dispader/e33a0d50af5871adab4a to your computer and use it in GitHub Desktop.

Select an option

Save Dispader/e33a0d50af5871adab4a to your computer and use it in GitHub Desktop.
git prompt
# "Hide in your shell, 'cause the world is out to bleed you for a ride." —Roger Hodgson
#
# ${BEAT} is undefined, so we can pretend to read this.
#
if [ "$USER" != "root" ]; then
export PS1='\[\033[1;37m\](\w)\[\033[0m\]${BEAT}\[\033[4m\]$(__git_ps1 " %s ")\[\033[0m\]${BEAT}\[\033[36m\]{\h}\[\033[0m\]${BEAT}\[\033[7m\]\D{%I:%M%P}\[\033[0m\]${BEAT}] ';
fi
if [ "$USER" == "root" ]; then
export PS1="\[\033[1;37m\](\w)\[\033[0m\]${BEAT}\[\033[36m\]{\h}\[\033[0m\]${BEAT}\[\033[7m\]\D{%I:%M%P}\[\033[0m\]${BEAT}# ";
fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment