aboutsummaryrefslogtreecommitdiff
path: root/Emacs/.config/emacs/elisp
diff options
context:
space:
mode:
authorAryadev Chavali <aryadev@aryadevchavali.com>2025-11-04 16:43:02 +0000
committerAryadev Chavali <aryadev@aryadevchavali.com>2025-11-04 16:43:02 +0000
commit088ce4a8656ae8ae882c4c8bb043b9792895964a (patch)
tree8a24fd0548b25b4e23e8645c9518bdb41b97074b /Emacs/.config/emacs/elisp
parentd46304378c03482ffdfb96fe582a95796b1db194 (diff)
downloaddotfiles-088ce4a8656ae8ae882c4c8bb043b9792895964a.tar.gz
dotfiles-088ce4a8656ae8ae882c4c8bb043b9792895964a.tar.bz2
dotfiles-088ce4a8656ae8ae882c4c8bb043b9792895964a.zip
Add exit status code on failure to eshell prompt
Diffstat (limited to 'Emacs/.config/emacs/elisp')
-rw-r--r--Emacs/.config/emacs/elisp/eshell-prompt.el5
1 files changed, 4 insertions, 1 deletions
diff --git a/Emacs/.config/emacs/elisp/eshell-prompt.el b/Emacs/.config/emacs/elisp/eshell-prompt.el
index 3559bed..1571cbd 100644
--- a/Emacs/.config/emacs/elisp/eshell-prompt.el
+++ b/Emacs/.config/emacs/elisp/eshell-prompt.el
@@ -52,7 +52,10 @@
"]"
"\n"
("└─>" :foreground ,ep/pipe-colour)
- (,ep/user-prompt :foreground ,(ep/--colour-on-last-command))
+ (,(if (= eshell-last-command-status 0)
+ ep/user-prompt
+ (format " [%d]%s" eshell-last-command-status ep/user-prompt))
+ :foreground ,(ep/--colour-on-last-command))
(" " default))
(mapconcat
#'(lambda (item)