Skip to content

Instantly share code, notes, and snippets.

@tarrsalah
Last active June 10, 2016 21:57
Show Gist options
  • Save tarrsalah/1709d5914020a27233d7 to your computer and use it in GitHub Desktop.
Save tarrsalah/1709d5914020a27233d7 to your computer and use it in GitHub Desktop.
parse_git_branch() {
git branch 2> /dev/null | sed -e '/^[^*]/d' -e 's/* \(.*\)/ (\1)/'
}
LightRed="\[$(tput bold ; tput setaf 1)\]"
Yellow="\[$(tput bold ; tput setaf 3)\]"
LightCyan="\[$(tput bold ; tput setaf 6)\]"
NC="\[$(tput sgr0)\]" # No Color
export PS1="\u:${LightRed}$\w${Yellow}\$(parse_git_branch)\n ${LightCyan}λ ${NC}"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment