aboutsummaryrefslogtreecommitdiff
path: root/home/.bashrc.d
diff options
context:
space:
mode:
authorJakob Odersky <jakob@odersky.com>2016-12-11 00:16:12 -0800
committerJakob Odersky <jakob@odersky.com>2016-12-11 00:16:12 -0800
commit15ca57504fb53e7cbf431e266b24e624d056151a (patch)
tree36e2112e7c42be500d549637b1c4cd63272e9fb2 /home/.bashrc.d
parent24c93a2e42b556c22846efd707e5d6fc19d46f55 (diff)
downloaddotfiles-15ca57504fb53e7cbf431e266b24e624d056151a.tar.gz
dotfiles-15ca57504fb53e7cbf431e266b24e624d056151a.tar.bz2
dotfiles-15ca57504fb53e7cbf431e266b24e624d056151a.zip
Add exit status
Diffstat (limited to 'home/.bashrc.d')
-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}"
}