Created
March 21, 2014 23:30
-
-
Save goosetav/9698683 to your computer and use it in GitHub Desktop.
example of installing git-prompt into an existing PS1 prompt; now in color!
This file contains hidden or 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-ify shell prompt | |
source ~/.git-prompt.sh | |
GIT_PS1='$(__git_ps1 " \[\033[0;32m\]%s\[\033[0m\]")' | |
export GIT_PS1_SHOWDIRTYSTATE="1" | |
export GIT_PS1_SHOWUPSTREAM="auto" | |
# example PS1 prompt or include $GIT_PS1 into yoru existing prompt | |
export PS1="\[\e]2;\u \w\a\e[32;1m\]$SI\w$NM$GIT_PS1 #\[\e[0m\] " |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment