diff options
Diffstat (limited to '')
-rw-r--r-- | .emacs.d/lisp/bandali-eshell.el | 33 |
1 files changed, 22 insertions, 11 deletions
diff --git a/.emacs.d/lisp/bandali-eshell.el b/.emacs.d/lisp/bandali-eshell.el index 66e7808..7bf3b4f 100644 --- a/.emacs.d/lisp/bandali-eshell.el +++ b/.emacs.d/lisp/bandali-eshell.el @@ -31,19 +31,30 @@ eshell-directory-name (b/var "eshell/") eshell-hist-ignoredups t eshell-input-filter #'eshell-input-filter-initial-space - eshell-prompt-regexp "\\(.*\n\\)*[$#] " + ;; 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))) + 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)))) + (concat ": " + (system-name) + ":" + (abbreviate-file-name (eshell/pwd)) + (unless (eshell-exit-success-p) + (format " [%d]" eshell-last-command-status)) + (if (= (file-user-uid) 0) " # " " $ ") + "; "))) (eval-when-compile (defvar eshell-prompt-regexp) (declare-function eshell-life-is-too-much "esh-mode") |