themes: Adapt themes to new scm_prompt api

This commit is contained in:
Noah Gorny
2021-05-16 16:53:32 +03:00
parent 2ae0350f5d
commit dff892e0a3
14 changed files with 33 additions and 180 deletions

View File

@@ -3,16 +3,6 @@ SCM_THEME_PROMPT_DIRTY="${bold_red} ✗${normal}"
SCM_THEME_PROMPT_CLEAN="${bold_green}${normal}"
SCM_GIT_CHAR="${green}±${normal}"
scm_prompt() {
CHAR=$(scm_char)
if [ $CHAR = $SCM_NONE_CHAR ]
then
return
else
echo " [$(scm_char)$(scm_prompt_info)]"
fi
}
mark_prompt() {
echo "${green}\$${normal}"
}
@@ -25,6 +15,7 @@ user_host_path_prompt() {
}
prompt() {
SCM_PROMPT_FORMAT=' [%s%s]'
PS1="$(user_host_path_prompt)$(virtualenv_prompt)$(scm_prompt) $(mark_prompt) "
}