From cb5047734b7492ccc0fc19378d071c46edcc9efd Mon Sep 17 00:00:00 2001 From: tiago Date: Sun, 24 Jan 2021 17:12:38 +0000 Subject: [PATCH] retval check --- themes/modern/modern.theme.bash | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/themes/modern/modern.theme.bash b/themes/modern/modern.theme.bash index a3837be9..f14fd4fd 100644 --- a/themes/modern/modern.theme.bash +++ b/themes/modern/modern.theme.bash @@ -46,7 +46,8 @@ detect_venv() { } prompt() { - if [ $? -ne 0 ]; then + retval=$? + if [[ retval -ne 0 ]]; then PS1="${TITLEBAR}${bold_red}┌─${reset_color}$(modern_scm_prompt)[${cyan}\u${normal}][${cyan}\w${normal}]$(is_vim_shell)\n${bold_red}└─▪${normal} " else PS1="${TITLEBAR}┌─$(modern_scm_prompt)[${cyan}\u${normal}][${cyan}\w${normal}]$(is_vim_shell)\n└─▪ "