From 78888d8bf99f2e1e7ebb24b879f4249f3a136182 Mon Sep 17 00:00:00 2001 From: Koichi Murase Date: Sun, 28 Apr 2024 04:18:17 +0900 Subject: [PATCH] themes/modern: Use $'\n' to include a newline character --- themes/modern/modern.theme.sh | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/themes/modern/modern.theme.sh b/themes/modern/modern.theme.sh index e2916f3..0050601 100644 --- a/themes/modern/modern.theme.sh +++ b/themes/modern/modern.theme.sh @@ -36,14 +36,11 @@ function modern_scm_prompt { function _omb_theme_PROMPT_COMMAND { if (($? != 0)); then - # Yes, the indenting on these is weird, but it has to be like - # this otherwise it won't display properly. - - PS1="${TITLEBAR}${_omb_prompt_bold_brown}┌─${_omb_prompt_reset_color}$(modern_scm_prompt)[${_omb_prompt_teal}\W${_omb_prompt_normal}][$(battery_charge)]$(is_vim_shell) -${_omb_prompt_bold_brown}└─▪${_omb_prompt_normal} " + PS1="${TITLEBAR}${_omb_prompt_bold_brown}┌─${_omb_prompt_reset_color}$(modern_scm_prompt)[${_omb_prompt_teal}\W${_omb_prompt_normal}][$(battery_charge)]$(is_vim_shell)" + PS1=$PS1$'\n'"${_omb_prompt_bold_brown}└─▪${_omb_prompt_normal} " else - PS1="${TITLEBAR}┌─$(modern_scm_prompt)[${_omb_prompt_teal}\W${_omb_prompt_normal}][$(battery_charge)]$(is_vim_shell) -└─▪ " + PS1="${TITLEBAR}┌─$(modern_scm_prompt)[${_omb_prompt_teal}\W${_omb_prompt_normal}][$(battery_charge)]$(is_vim_shell)" + PS1=$PS1$'\n'"└─▪ " fi }