Skip to content

Instantly share code, notes, and snippets.

@ckunte
Created July 26, 2019 05:22
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ckunte/5adb355dec294e369ce7d1508e84eed0 to your computer and use it in GitHub Desktop.
Save ckunte/5adb355dec294e369ce7d1508e84eed0 to your computer and use it in GitHub Desktop.
Simple colorful bash prompt with git status
git_branch() {
git branch 2> /dev/null | sed -e '/^[^*]/d' -e 's/* \(.*\)/(\1)/'
}
PS1='\e[36m\u\e[39m at \e[35m\h\e[39m \e[93m\w\e[39m \e[32m$(git_branch)\e[39m\n$ '
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment