Last active
August 3, 2017 08:43
-
-
Save neocotic/5d7f50d33a387821735f to your computer and use it in GitHub Desktop.
Personal Bash Prompt
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
# Override bash prompt depending on colors being enabled and if you are root | |
if [ -x /usr/bin/tput ] && tput setaf 1 >&/dev/null; then | |
if [ $(id -u) -eq 0 ]; then | |
PS1=$'\u@\h:\W\[$(tput setaf 2)\]$(__git_ps1 " (%s)")\[$(tput sgr0)\] \[$(tput setaf 1)\]\xCE\xBB\[$(tput sgr0)\] ' | |
else | |
PS1=$'\u@\h:\W\[$(tput setaf 2)\]$(__git_ps1 " (%s)")\[$(tput sgr0)\] \xCE\xBB ' | |
fi | |
fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment