projects
/
~bandali
/
configs
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (from parent 1:
ccade20
)
emacs/eshell: restore mistakenly deleted custom eshell prompt
author
Amin Bandali
<bandali@gnu.org>
Sat, 11 Apr 2020 22:33:35 +0000
(18:33 -0400)
committer
Amin Bandali
<bandali@gnu.org>
Sat, 11 Apr 2020 22:33:35 +0000
(18:33 -0400)
.emacs.d/init.el
patch
|
blob
|
blame
|
history
diff --git
a/.emacs.d/init.el
b/.emacs.d/init.el
index
994b536
..
04133fe
100644
(file)
--- 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))))
(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)
:hook (eshell-mode . b/eshell-setup)
:custom
(eshell-hist-ignoredups t)