From 088ce4a8656ae8ae882c4c8bb043b9792895964a Mon Sep 17 00:00:00 2001 From: Aryadev Chavali Date: Tue, 4 Nov 2025 16:43:02 +0000 Subject: Add exit status code on failure to eshell prompt --- Emacs/.config/emacs/elisp/eshell-prompt.el | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'Emacs') 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) -- cgit v1.2.3-13-gbd6f