revert the backslash in the base file, and remove it in theme 'axin', fix the git branch name show error

pull/1124/head
阿信sxq 2018-01-02 18:10:38 +08:00
parent 40fd3813d3
commit 517f6c94f9
2 changed files with 4 additions and 4 deletions

View File

@ -30,7 +30,7 @@ else
fi fi
function prompt_command() { function prompt_command() {
PS1="\[${BOLD}${MAGENTA}\]\u \[$WHITE\]@ \[$ORANGE\]\h \[$WHITE\]in \[$GREEN\]\w\[$WHITE\]\[$SCM_THEME_PROMPT_PREFIX\]$(clock_prompt) \[$PURPLE\]\$(scm_prompt_info) \n\$ \[$RESET\]" PS1="\[${BOLD}${MAGENTA}\]\u \[$WHITE\]@ \[$ORANGE\]\h \[$WHITE\]in \[$GREEN\]\w\[$WHITE\]\[$SCM_THEME_PROMPT_PREFIX\]$(clock_prompt) \[$PURPLE\]$(scm_prompt_info) \n\$ \[$RESET\]"
} }
THEME_CLOCK_COLOR=${THEME_CLOCK_COLOR:-"${white}"} THEME_CLOCK_COLOR=${THEME_CLOCK_COLOR:-"${white}"}

View File

@ -134,7 +134,7 @@ function git_prompt_minimal_info {
_git-hide-status && return _git-hide-status && return
SCM_BRANCH="${SCM_THEME_BRANCH_PREFIX}$(_git-friendly-ref)" SCM_BRANCH="${SCM_THEME_BRANCH_PREFIX}\$(_git-friendly-ref)"
if [[ -n "$(_git-status | tail -n1)" ]]; then if [[ -n "$(_git-status | tail -n1)" ]]; then
SCM_DIRTY=1 SCM_DIRTY=1
@ -150,7 +150,7 @@ function git_prompt_minimal_info {
function git_prompt_vars { function git_prompt_vars {
if _git-branch &> /dev/null; then if _git-branch &> /dev/null; then
SCM_GIT_DETACHED="false" SCM_GIT_DETACHED="false"
SCM_BRANCH="${SCM_THEME_BRANCH_PREFIX}$(_git-friendly-ref)$(_git-remote-info)" SCM_BRANCH="${SCM_THEME_BRANCH_PREFIX}\$(_git-friendly-ref)$(_git-remote-info)"
else else
SCM_GIT_DETACHED="true" SCM_GIT_DETACHED="true"
@ -160,7 +160,7 @@ function git_prompt_vars {
else else
detached_prefix=${SCM_THEME_DETACHED_PREFIX} detached_prefix=${SCM_THEME_DETACHED_PREFIX}
fi fi
SCM_BRANCH="${detached_prefix}$(_git-friendly-ref)" SCM_BRANCH="${detached_prefix}\$(_git-friendly-ref)"
fi fi
IFS=$'\t' read -r commits_behind commits_ahead <<< "$(_git-upstream-behind-ahead)" IFS=$'\t' read -r commits_behind commits_ahead <<< "$(_git-upstream-behind-ahead)"