Created
January 12, 2018 15:47
-
-
Save jhammann/e330e2fc84378a3e71dc3f03a0847e49 to your computer and use it in GitHub Desktop.
Bash profile snippets
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 branch in prompt. | |
parse_git_branch() { | |
git branch 2> /dev/null | sed -e '/^[^*]/d' -e 's/* \(.*\)/ (\1)/' | |
} | |
source /usr/local/git/contrib/completion/git-prompt.sh | |
export GIT_PS1_SHOWDIRTYSTATE=1 | |
PS1="\[\e[30;46m\] \u \[\e[0m\]\[\e[30;42m\] \W \[\e[0m\]\[\e[37;45m\]\$(__git_ps1 ' ⑂ %s ')\[\e[0m\] $ " | |
# Git branch autocompletion | |
test -f ~/.git-completion.bash && . $_ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment