Skip to content

Instantly share code, notes, and snippets.

@tarrsalah
Created October 3, 2018 11:48
Show Gist options
  • Save tarrsalah/4dd91fddd1f11d7d6c24f83605806192 to your computer and use it in GitHub Desktop.
Save tarrsalah/4dd91fddd1f11d7d6c24f83605806192 to your computer and use it in GitHub Desktop.
# PS1
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