summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAmin Bandali <bandali@gnu.org>2020-04-11 18:33:35 -0400
committerAmin Bandali <bandali@gnu.org>2020-04-11 18:33:35 -0400
commit5b4b57a9b114fb1d57cde09bc9ad7a02d3fb10e1 (patch)
tree88f78aa16099db633c5adf8a9ebb81bba3ce98bc
parentccade202a625f6bab9b21bf8fa245807bdcaa818 (diff)
downloadconfigs-5b4b57a9b114fb1d57cde09bc9ad7a02d3fb10e1.tar.gz
configs-5b4b57a9b114fb1d57cde09bc9ad7a02d3fb10e1.tar.xz
configs-5b4b57a9b114fb1d57cde09bc9ad7a02d3fb10e1.zip
emacs/eshell: restore mistakenly deleted custom eshell prompt
-rw-r--r--.emacs.d/init.el15
1 files changed, 15 insertions, 0 deletions
diff --git a/.emacs.d/init.el b/.emacs.d/init.el
index 994b536..04133fe 100644
--- a/.emacs.d/init.el
+++ b/.emacs.d/init.el
@@ -1022,6 +1022,21 @@ This function is intended for use with `ivy-ignore-buffers'."
(bind-keys :map eshell-mode-map
("M-r" . counsel-esh-history))))
+ (setq
+ eshell-prompt-regexp "\\(.*\n\\)*[$#] "
+ eshell-prompt-function
+ (lambda ()
+ (concat
+ (propertize (format "%s@%s:" (user-login-name) (system-name))
+ 'face 'default)
+ (propertize (abbreviate-file-name default-directory)
+ 'face 'font-lock-comment-face)
+ (propertize "\n" 'face 'default)
+ (if (= (user-uid) 0)
+ (propertize "#" 'face 'red)
+ (propertize "$" 'face 'default))
+ (propertize " " 'face 'default))))
+
:hook (eshell-mode . b/eshell-setup)
:custom
(eshell-hist-ignoredups t)