Created
January 24, 2014 21:52
-
-
Save squid314/8607384 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 stuff (pulled from https://github.com/git/git/tree/master/contrib/completion) | |
if [ -f ~/.git-completion.bash ] ; then . ~/.git-completion.bash ; fi | |
if [ -f ~/.git-prompt.sh ] ; then . ~/.git-prompt.sh ; fi | |
# see .git-prompt.sh for explanation of the (and other) options | |
export GIT_PS1_SHOWDIRTYSTATE=true GIT_PS1_SHOWSTASHSTATE=true GIT_PS1_SHOWUPSTREAM=auto | |
# append history file after each command and execute the git PS1 embed generator | |
PROMPT_COMMAND='history -a ; MY_GIT_PS1="`__git_ps1`"' | |
# better prompt (window title gets directory and git info, nice colors, last cmd status indicator) | |
PS1='\[\e]0;\w$MY_GIT_PS1\007\e[0;1;34m\]\u \[\e[32m\]\w$MY_GIT_PS1 `[ $? -eq 0 ]&&echo ":)\[\e[0;31"||echo "\[\e[31m\]:(\[\e[21"`m\] \$\[\e[0m\] ' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment