summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--.emacs.d/init.el19
1 files changed, 10 insertions, 9 deletions
diff --git a/.emacs.d/init.el b/.emacs.d/init.el
index 1f31d3b..422930e 100644
--- a/.emacs.d/init.el
+++ b/.emacs.d/init.el
@@ -1750,16 +1750,17 @@ This function is intended for use with `ivy-ignore-buffers'."
:defer 0.5
:after eshell
:config
- (defvar user-@-host (concat (user-login-name) "@" (system-name) " "))
+ (defvar user-@-host (concat (user-login-name) "@" (system-name) ":"))
(defun +eshell/prompt ()
- (let ((base/dir (shrink-path-prompt default-directory)))
- (concat (propertize user-@-host 'face 'default)
- (propertize (car base/dir)
- 'face 'font-lock-comment-face)
- (propertize (cdr base/dir)
- 'face 'font-lock-constant-face)
- (propertize "> " 'face 'default))))
- (setq eshell-prompt-regexp (concat user-@-host ".*> ")
+ (concat (propertize user-@-host '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)))
+ (setq eshell-prompt-regexp "\\(.*\n\\)*[$#] "
eshell-prompt-function #'+eshell/prompt))
(use-package eshell-up