From ec4e72bb63832f2a97343692974bcb8e0e495d77 Mon Sep 17 00:00:00 2001 From: Sean Whitton Date: Thu, 5 Oct 2023 13:44:28 +0100 Subject: archive custom Eshell prompt to git history Default prompt now includes the last command's exit code if nonzero. --- .emacs.d/init.el | 14 -------------- 1 file changed, 14 deletions(-) diff --git a/.emacs.d/init.el b/.emacs.d/init.el index 2e08850f..9694fd24 100644 --- a/.emacs.d/init.el +++ b/.emacs.d/init.el @@ -1740,20 +1740,6 @@ the non-side windows deleted by `delete-other-windows' will also reappear." (eshell-mode :abbrev "le" :file "esh-mode") "" "" "~/" '(eshell-electric-forward-slash) "src/dotfiles/scripts/") -;;; prompt - -;; Previously used "~/>" -- no trailing space -- where we appended the -;; additional forward slash at the end of the pwd as otherwise it is a bit too -;; short when we're directly inside HOME. An alternative approach used before -;; that was to call `abbreviate-file-name' only when not directly inside HOME. -(setq eshell-prompt-function - (lambda () - (if (zerop eshell-last-command-status) - (concat (abbreviate-file-name (eshell/pwd)) " % ") - (format "%s %s %% " eshell-last-command-status - (abbreviate-file-name (eshell/pwd))))) - eshell-prompt-regexp "^[^%\n]* % ") - ;;; getting to Eshell buffers (defun spw/eshell-jump (&optional chdir busy-okay) -- cgit v1.2.3