From 15ca57504fb53e7cbf431e266b24e624d056151a Mon Sep 17 00:00:00 2001 From: Jakob Odersky Date: Sun, 11 Dec 2016 00:16:12 -0800 Subject: Add exit status --- home/.bashrc.d/prompt.sh | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'home/.bashrc.d') 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}" } -- cgit v1.2.3