Last active
August 29, 2015 14:17
-
-
Save n8io/003431e5c9549d10f2ac to your computer and use it in GitHub Desktop.
Enhanced termial
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
#PROMPT STUFF | |
GREEN=$(tput setaf 2); | |
YELLOW=$(tput setaf 3); | |
WHITE=$(tput setaf 7) | |
function git_branch { | |
# Shows the current branch if in a git repository | |
git branch --no-color 2> /dev/null | sed -e '/^[^*]/d' -e 's/* \(.*\)/\ \(\1\)/'; | |
} | |
# More info at http://code-worrier.com/blog/autocomplete-git/ | |
if [ -f ~/.git-completion.bash ]; then | |
. ~/.git-completion.bash | |
fi | |
# Colorize for git dirs | |
PS1="${YELLOW}\w${GREEN}\$(git_branch)${WHITE}\n$ " |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment