Created
January 29, 2014 17:44
-
-
Save AlexandreRio/8693093 to your computer and use it in GitHub Desktop.
Git PS1 for bash
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
#On fedora __git_ps1 is not in git_completion.sh | |
if [ -f /usr/share/git-core/contrib/completion/git-prompt.sh ]; then | |
. /usr/share/git-core/contrib/completion/git-prompt.sh | |
fi | |
function set_bash_prompt { | |
PS1="\[$IGreen\]\u \[$Blue\]\w \[$Color_Off\]$(__git_ps1 '(%s)') > " | |
} | |
PROMPT_COMMAND=set_bash_prompt |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment