Last active
January 2, 2018 17:06
-
-
Save mattmeng/dccbfc6859afd049085ba559577c73ea to your computer and use it in GitHub Desktop.
.bashrc
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
GIT_PS1_SHOWCOLORHINTS=true | |
green="$(tput setaf 2)" | |
red="$(tput setaf 1)" | |
blue="$(tput setaf 4)" | |
yellow="$(tput setaf 3)" | |
white="$(tput setaf 7)" | |
bold="$(tput bold)" | |
reset="$(tput sgr0)" | |
PS1="\`if [[ \$? = "0" ]]; then echo '\n$green'; else echo '\n$red'; fi\`\$(s=\$(printf "%*s" \$COLUMNS); echo \${s// /-})\n \[$reset\]\[$blue\]\W\$(__git_ps1 \"\[$bold\](\[$reset\]\[$green\]%s\[$reset\]\[$blue\]\[$bold\])\") \[$reset\]\[$yellow\]\[$reset\]" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment