Updated the color themes. Added underline and background colors.

This commit is contained in:
Robert R Evans
2010-10-09 15:01:50 -07:00
parent 0cd8b40339
commit 45a50c099e
6 changed files with 40 additions and 75 deletions

View File

@@ -2,20 +2,20 @@
# Stolen from Steve Losh
function prompt_char {
git branch >/dev/null 2>/dev/null && echo '±' && return
hg root >/dev/null 2>/dev/null && echo '☿' && return
echo '○'
git branch >/dev/null 2>/dev/null && echo -e '±' && return
hg root >/dev/null 2>/dev/null && echo -e '☿' && return
echo -e '○'
}
function parse_git_dirty {
if [[ -n $(git status -s 2> /dev/null) ]]; then
echo "$GIT_THEME_PROMPT_DIRTY"
echo -e "$GIT_THEME_PROMPT_DIRTY"
else
echo "$GIT_THEME_PROMPT_CLEAN"
echo -e "$GIT_THEME_PROMPT_CLEAN"
fi
}
function git_prompt_info() {
ref=$(git symbolic-ref HEAD 2> /dev/null) || return
echo "$GIT_THEME_PROMPT_PREFIX${ref#refs/heads/}$(parse_git_dirty)$GIT_THEME_PROMPT_SUFFIX"
echo -e "$GIT_THEME_PROMPT_PREFIX${ref#refs/heads/}$(parse_git_dirty)$GIT_THEME_PROMPT_SUFFIX"
}