Skip to content

Instantly share code, notes, and snippets.

@vstoykov
Last active October 7, 2015 18:27
Show Gist options
  • Save vstoykov/3206507 to your computer and use it in GitHub Desktop.
Save vstoykov/3206507 to your computer and use it in GitHub Desktop.
Add some extra stuffs on BASH prompt
export GIT_PS1_SHOWDIRTYSTATE=true
export GIT_PS1_SHOWUNTRACKEDFILES=true
if [ "$color_prompt" = yes ]; then
PS1='${debian_chroot:+($debian_chroot)} `if [ $? = 0 ]; then echo "\[\e[32m\]✔"; else echo "\[\e[31m\]✘"; fi` \[\033[01;32m\]\u@\h\[\033[00m\]:\[\033[01;34m\]\w\[\033[00m\] `__git_ps1 "(%s)"`\n \[\033[01;34m\]\$\[\033[00m\] '
else
PS1='${debian_chroot:+($debian_chroot)}\u@\h:\w$(__git_ps1 " (%s) ")\$ '
fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment