themes: Adapt themes to new scm_prompt api
This commit is contained in:
@@ -28,30 +28,21 @@ is_vim_shell() {
|
||||
fi
|
||||
}
|
||||
|
||||
modern_scm_prompt() {
|
||||
CHAR=$(scm_char)
|
||||
if [ $CHAR = $SCM_NONE_CHAR ]
|
||||
then
|
||||
return
|
||||
else
|
||||
echo "[$(scm_char)][$(scm_prompt_info)]"
|
||||
fi
|
||||
}
|
||||
|
||||
modern_current_time_prompt() {
|
||||
echo "[$(date '+%l:%M%p')]"
|
||||
}
|
||||
|
||||
prompt() {
|
||||
SCM_PROMPT_FORMAT='[%s][%s]'
|
||||
if [ $? -ne 0 ]
|
||||
then
|
||||
# Yes, the indenting on these is weird, but it has to be like
|
||||
# this otherwise it won't display properly.
|
||||
|
||||
PS1="${TITLEBAR}${bold_red}┌─${reset_color}$(modern_scm_prompt)$(modern_current_time_prompt)[${cyan}\W${normal}]$(is_vim_shell)
|
||||
PS1="${TITLEBAR}${bold_red}┌─${reset_color}$(scm_prompt)$(modern_current_time_prompt)[${cyan}\W${normal}]$(is_vim_shell)
|
||||
${bold_red}└─▪${normal} "
|
||||
else
|
||||
PS1="${TITLEBAR}┌─$(modern_scm_prompt)$(modern_current_time_prompt)[${cyan}\W${normal}]$(is_vim_shell)
|
||||
PS1="${TITLEBAR}┌─$(scm_prompt)$(modern_current_time_prompt)[${cyan}\W${normal}]$(is_vim_shell)
|
||||
└─▪ "
|
||||
fi
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user