Skip to content

Instantly share code, notes, and snippets.

@rootindex
Created May 23, 2016 07:53
Show Gist options
  • Save rootindex/83951b6100a61f788c9c45cd9ba1f08d to your computer and use it in GitHub Desktop.
Save rootindex/83951b6100a61f788c9c45cd9ba1f08d to your computer and use it in GitHub Desktop.
export GIT_PS1_SHOWDIRTYSTATE=true
export GIT_PS1_SHOWUNTRACKEDFILES=true
export PS1="\$([[ \$? != 0 ]] && echo \"[\[\033[0;31m\]\342\234\227\[\033[0;37m\]] \")[\e[38;5;240m\@\e[m] [$(if [[ ${EUID} == 0 ]]; then echo '\[\033[0;31m\]\h'; else echo '\[\e[38;5;193m\u\[\033[0;37m\]@\e[38;5;26m\h'; fi)\[\033[0;37m\]][\[\033[0;32m\]\w\[\033[0;37m\]]\e[38;5;198m\$(__git_ps1 "[%s]")\e[m\n$ "
@rootindex
Copy link
Author

Preview of My PS1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment