From 092f0a386ecd48599be0cc9de06d79c44039cfb2 Mon Sep 17 00:00:00 2001 From: Mark Wooding Date: Tue, 15 Dec 2009 14:41:05 +0000 Subject: [PATCH] el/dot-emacs.el: Experimental tweaking for the Emacs shell. Now Emacs is my shell. Truly, I shall not want. --- el/dot-emacs.el | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) diff --git a/el/dot-emacs.el b/el/dot-emacs.el index 4d82b1a..0d0a7d7 100644 --- a/el/dot-emacs.el +++ b/el/dot-emacs.el @@ -2054,6 +2054,32 @@ strip numbers instead." (setq sh-basic-offset 2)) ;;;-------------------------------------------------------------------------- +;;; Emacs shell mode. + +(defun mdw-eshell-prompt () + (let ((left "[") (right "]")) + (when (= (user-uid) 0) + (setq left "«" right "»")) + (concat left + (save-match-data + (replace-regexp-in-string "\\..*$" "" (system-name))) + " " + (eshell/pwd) + right))) +(setq eshell-prompt-function 'mdw-eshell-prompt) +(setq eshell-prompt-regexp "^\\[[^]]+\\]") + +(mdw-define-face eshell-prompt (t :weight bold)) +(mdw-define-face eshell-ls-archive (t :weight bold :foreground "red")) +(mdw-define-face eshell-ls-backup (t :foreground "lightgrey" :slant italic)) +(mdw-define-face eshell-ls-product (t :foreground "lightgrey" :slant italic)) +(mdw-define-face eshell-ls-clutter (t :foreground "lightgrey" :slant italic)) +(mdw-define-face eshell-ls-executable (t :weight bold)) +(mdw-define-face eshell-ls-directory (t :foreground "cyan" :weight bold)) +(mdw-define-face eshell-ls-readonly (t nil)) +(mdw-define-face eshell-ls-symlink (t :foreground "cyan")) + +;;;-------------------------------------------------------------------------- ;;; Messages-file mode. (defun messages-mode-guts () -- 2.11.0