diff options
author | Jakob Odersky <jakob@odersky.com> | 2016-12-11 00:16:12 -0800 |
---|---|---|
committer | Jakob Odersky <jakob@odersky.com> | 2016-12-11 00:16:12 -0800 |
commit | 15ca57504fb53e7cbf431e266b24e624d056151a (patch) | |
tree | 36e2112e7c42be500d549637b1c4cd63272e9fb2 /home/.bashrc.d | |
parent | 24c93a2e42b556c22846efd707e5d6fc19d46f55 (diff) | |
download | dotfiles-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.sh | 6 |
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}" } |