aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--home/.bashrc.d/prompt.sh6
1 files changed, 5 insertions, 1 deletions
diff --git a/home/.bashrc.d/prompt.sh b/home/.bashrc.d/prompt.sh
index 3886855..b0f8a92 100644
--- a/home/.bashrc.d/prompt.sh
+++ b/home/.bashrc.d/prompt.sh
@@ -13,7 +13,7 @@ function __prompt_command() {
PS1+="ā•­"
- if [ $EXIT = 0 ]; then
+ if [ "$EXIT" -eq 0 ]; then
PS1+="${green}(āœ”)${reset} "
else
PS1+="${red}(āœ—)${reset} "
@@ -43,5 +43,9 @@ function __prompt_command() {
fi
fi
+ if [ "$EXIT" -ne 0 ]; then
+ PS1+=" ${red}(exit $EXIT)${reset}"
+ fi
+
PS1+="\nā•°\$ ${reset}"
}