summary refs log tree commit diff
path: root/emacs
diff options
context:
space:
mode:
Diffstat (limited to 'emacs')
-rw-r--r--emacs/custom/fcuny-eshell.el6
1 files changed, 3 insertions, 3 deletions
diff --git a/emacs/custom/fcuny-eshell.el b/emacs/custom/fcuny-eshell.el
index fce4ccb..f4b0737 100644
--- a/emacs/custom/fcuny-eshell.el
+++ b/emacs/custom/fcuny-eshell.el
@@ -103,8 +103,8 @@ host and starts with `ssh:', then we replace the prompt with
    (let ((absolute-path (eshell/pwd)))
      (if (string-match "/ssh:\\(.+\\):" absolute-path)
          (replace-match (concat "@" (match-string 1 absolute-path) " ")  nil nil absolute-path)
-     (fcuny/shorten-path absolute-path)))
-   "; "))
+       (fcuny/shorten-path absolute-path)))
+   (if (= (user-uid) 0) " # " " $ ")))
 
 (defun fcuny/eshell-here ()
   "Opens up a new shell in the directory associated with the current
@@ -200,7 +200,7 @@ append to it, while separating multiple outputs with
   (eshell-review-quick-commands nil)
   (eshell-smart-space-goes-to-end t)
   (eshell-prompt-function 'fcuny/eshell-prompt)
-  (eshell-prompt-regexp "^[^;]*; ")
+  (tramp-shell-prompt-pattern "^[^$>\n]*[#$%>] *\\(\[[0-9;]*[a-zA-Z] *\\)*")
   (eshell-destroy-buffer-when-process-dies t))
 
 (use-package eshell-bookmark