summary refs log tree commit diff
path: root/emacs/custom
diff options
context:
space:
mode:
Diffstat (limited to 'emacs/custom')
-rw-r--r--emacs/custom/fcuny-eshell.el5
1 files changed, 3 insertions, 2 deletions
diff --git a/emacs/custom/fcuny-eshell.el b/emacs/custom/fcuny-eshell.el
index f4b0737..6bcef86 100644
--- a/emacs/custom/fcuny-eshell.el
+++ b/emacs/custom/fcuny-eshell.el
@@ -75,6 +75,7 @@
 parent directories with their initial characters to try to get the character
 length of PATH (sans directory slashes) down to MAX-LEN."
   (let* ((components (split-string (abbreviate-file-name path) "/"))
+         (host (propertize (system-name) 'face `(:background "#4ba9aa")))
          (max-len (or max-len 30))
          (len (+ (1- (length components))
                  (cl-reduce '+ components :key 'length)))
@@ -93,7 +94,7 @@ length of PATH (sans directory slashes) down to MAX-LEN."
                                  (string (elt (car components) 0) ?/)))))
             len (- len (1- (length (car components))))
             components (cdr components)))
-    (concat str (cl-reduce (lambda (a b) (concat a "/" b)) components))))
+    (concat host " " str (cl-reduce (lambda (a b) (concat a "/" b)) components))))
 
 (defun fcuny/eshell-prompt ()
   "Sets the prompt for eshell. If the current path is on a remote
@@ -102,7 +103,7 @@ host and starts with `ssh:', then we replace the prompt with
   (concat
    (let ((absolute-path (eshell/pwd)))
      (if (string-match "/ssh:\\(.+\\):" absolute-path)
-         (replace-match (concat "@" (match-string 1 absolute-path) " ")  nil nil absolute-path)
+         (replace-match (propertize (concat "@" (match-string 1 absolute-path) " ") 'face `(:background "#4ba9aa"))  nil nil absolute-path)
        (fcuny/shorten-path absolute-path)))
    (if (= (user-uid) 0) " # " " $ ")))