Simpler prompt

pull/1544/head
jimwhimpey 2015-06-09 21:22:17 -07:00
parent 5517fcd20d
commit 322bf41ce2
2 changed files with 10 additions and 10 deletions

18
themes/base.theme.bash 100644 → 100755
View File

@ -122,15 +122,15 @@ function git_prompt_vars {
fi
fi
local ahead_re='.+ahead ([0-9]+).+'
local behind_re='.+behind ([0-9]+).+'
[[ "${status}" =~ ${ahead_re} ]] && SCM_BRANCH+=" ${SCM_GIT_AHEAD_CHAR}${BASH_REMATCH[1]}"
[[ "${status}" =~ ${behind_re} ]] && SCM_BRANCH+=" ${SCM_GIT_BEHIND_CHAR}${BASH_REMATCH[1]}"
local stash_count="$(git stash list 2> /dev/null | wc -l | tr -d ' ')"
[[ "${stash_count}" -gt 0 ]] && SCM_BRANCH+=" {${stash_count}}"
SCM_BRANCH+=${details}
# local ahead_re='.+ahead ([0-9]+).+'
# local behind_re='.+behind ([0-9]+).+'
# [[ "${status}" =~ ${ahead_re} ]] && SCM_BRANCH+=" ${SCM_GIT_AHEAD_CHAR}${BASH_REMATCH[1]}"
# [[ "${status}" =~ ${behind_re} ]] && SCM_BRANCH+=" ${SCM_GIT_BEHIND_CHAR}${BASH_REMATCH[1]}"
#
# local stash_count="$(git stash list 2> /dev/null | wc -l | tr -d ' ')"
# [[ "${stash_count}" -gt 0 ]] && SCM_BRANCH+=" {${stash_count}}"
#
# SCM_BRANCH+=${details}
SCM_PREFIX=${GIT_THEME_PROMPT_PREFIX:-$SCM_THEME_PROMPT_PREFIX}
SCM_SUFFIX=${GIT_THEME_PROMPT_SUFFIX:-$SCM_THEME_PROMPT_SUFFIX}

View File

@ -13,7 +13,7 @@ prompt_setter() {
# displays user@server in purple
# PS1="$red$(scm_char) $purple\u@\h$reset_color:$blue\w$yellow$(scm_prompt_info)$(ruby_version_prompt) $black\$$reset_color "
# no user@server
PS1="\n$red$(scm_char) $green\w$yellow$(scm_prompt_info) ${bold_yellow}$normal "
PS1="\n$green\w$yellow$(scm_prompt_info) ${bold_yellow}$normal "
PS2='> '
PS4='+ '
}