Fix regressions in the prompt

This commit is contained in:
lhark 2018-03-19 14:49:06 -04:00
parent 7feece53e2
commit 00f2cded0c

7
prompt
View file

@ -54,7 +54,7 @@ prompt_chars() {
if $(git rev-parse --is-inside-work-tree >/dev/null 2>&1); then
local git_char="%{$fg_no_bold[blue]%}±%{$reset_color%}"
fi
printf "${_GIT_CHAR}$(last_status) $(color_prompt_char)"
printf "%s" "${_GIT_CHAR}$(last_status) $(color_prompt_char)"
}
charge_batterie() {
@ -133,11 +133,10 @@ vim_mode () {
# %r - The name of the root directory of the repository
# %s - The current version control system, like git or svn
# %u - unstagedstr (see below)
vcs_color='blue'
fmt_branch="%b%{$reset_color%} %u%c%m%{$reset_color%}" # e.g. master¹²
fmt_action="(%{$fg[red]%}%a%{$reset_color%})" # e.g. (rebase-i)
fmt_pre="%{$fg_bold[$vcs_color]%}[%{$reset_color%}%{$fg[$vcs_color]%}"
fmt_post="%{$fg_bold[$vcs_color]%}]%{$reset_color%}"
fmt_pre="%{$fg_bold[blue]%}[%{$reset_color%}%{$fg[blue]%}"
fmt_post="%{$fg_bold[blue]%}]%{$reset_color%}"
# check-for-changes can be really slow.
# you should disable it, if you work with large repositories