|
|
|
@ -43,10 +43,10 @@ last_status () { |
|
|
|
} |
|
|
|
|
|
|
|
virtual_env() { |
|
|
|
local prefix=" %{$fg_bold[green]%}(%{%b$fg[green]%}" |
|
|
|
local prefix="%{$fg_bold[green]%}(%{%b$fg[green]%}" |
|
|
|
local suffix="%{$reset_color$fg_bold[green]%})%{$reset_color%}" |
|
|
|
[[ -n ${VIRTUAL_ENV} ]] || return |
|
|
|
printf "${prefix}${VIRTUAL_ENV:t}${suffix}" |
|
|
|
printf '%s' "${prefix}${VIRTUAL_ENV:t}${suffix}" |
|
|
|
} |
|
|
|
|
|
|
|
prompt_chars() { |
|
|
|
@ -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 "%s" "${_GIT_CHAR}$(last_status) $(color_prompt_char)" |
|
|
|
printf '%s' "${_GIT_CHAR}$(last_status) $(color_prompt_char)" |
|
|
|
} |
|
|
|
|
|
|
|
charge_batterie() { |
|
|
|
@ -102,8 +102,8 @@ prompt_msg () { |
|
|
|
git_network_unreachable) |
|
|
|
msg="Can't reach rc git repo";; |
|
|
|
update_sys*) |
|
|
|
nb_pkg=$(printf "$line" | grep -o '[0-9]*' | head -n 1) |
|
|
|
msg="Update ready for the system. $nb_pkg new package$([ $nb_pkg -gt 1 ] && printf "s")";; |
|
|
|
nb_pkg=$(printf '%s' "$line" | grep -o '[0-9]*' | head -n 1) |
|
|
|
msg="Update ready for the system. $nb_pkg new package$([ $nb_pkg -gt 1 ] && printf 's')";; |
|
|
|
*) |
|
|
|
msg="";; |
|
|
|
esac |
|
|
|
|