Last active
October 1, 2016 00:34
-
-
Save gitaarik/af3216ab6abfc3173c49 to your computer and use it in GitHub Desktop.
native gitprompt
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
gitprompt() { | |
export GIT_PS1_SHOWDIRTYSTATE=true | |
export GIT_PS1_SHOWSTASHSTATE=true | |
export GIT_PS1_SHOWUNTRACKEDFILES=true | |
export GIT_PS1_SHOWUPSTREAM="auto" | |
export GIT_PS1_SHOWCOLORHINTS=true | |
export PROMPT_COMMAND='__git_ps1 "\u@\h:\w" "\\\$ "' | |
. /usr/lib/git-core/git-sh-prompt | |
export PS1='[\u@\h \W$(__git_ps1 " (%s)")]\$ ' | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment