Created
August 9, 2016 18:41
-
-
Save gchaix/c975838759dc2b69cf1e5eeb99affd37 to your computer and use it in GitHub Desktop.
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-prompt | |
export GIT_PS1=1 | |
if [ -f /usr/local/bin/git-prompt.sh ] && [ $GIT_PS1 -ne 0 ]; then | |
source /usr/local/bin/git-prompt.sh | |
export GIT_PS1_SHOWDIRTYSTATE=1 | |
export GIT_PS1_SHOWCOLORHINTS=1 | |
export GIT_PS1_SHOWUNTRACKEDFILES=1 | |
#export PS1=${PS1}$(__git_ps1 "\n(%s)\$ ") | |
if [ "${SERVER_TYPE_PROMPT}" ]; then | |
PROMPT="${SERVER_TYPE_PROMPT}\[\033]0;\u@\h:$PWD\007\]" | |
fi | |
if [ ${EUID} == 0 ] ; then | |
PROMPT_COMMAND='__git_ps1 "${PROMPT}\[\033[01;31m\]\u@\h\[\033[01;34m\]:\W\[\033[00m\]" "\\\$ "' | |
else | |
PROMPT_COMMAND='__git_ps1 "${PROMPT}\[\033[01;32m\]\u@\h\[\033[00m\]:\[\033[01;34m\]\W\[\033[00m\]" "\\\$ "' | |
fi | |
fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment