Skip to content

Instantly share code, notes, and snippets.

@arodu
Last active June 13, 2021 14:15
Show Gist options
  • Save arodu/b0e835d1a172b6120c547c9c454d7662 to your computer and use it in GitHub Desktop.
Save arodu/b0e835d1a172b6120c547c9c454d7662 to your computer and use it in GitHub Desktop.
bash git promt
[ -r /usr/share/bash-completion/bash_completion ] && . /usr/share/bash-completion/bash_completion
. /usr/share/git/completion/git-completion.bash
. /usr/share/git/completion/git-prompt.sh
export GIT_PS1_SHOWDIRTYSTATE=1
# colors!
red="\e[1;31m"
green="\e[1;32m"
yellow="\e[1;33m"
blue="\e[1;34m"
magenta="\e[1;35m"
cyan="\e[1;36m"
white="\e[1;37m"
reset="\e[1;0m"
color=$green
PS1="$color[\u@\h$white \W$color]$white$(__git_ps1 '(%s)')$color \$$reset "
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment