diff options
author | Franck Cuny <franck@fcuny.net> | 2021-11-29 11:10:56 -0800 |
---|---|---|
committer | Franck Cuny <franck@fcuny.net> | 2021-11-29 11:10:56 -0800 |
commit | 874d638db9fc0b36b6c1176252c77ed2feba046b (patch) | |
tree | 83d5db385a2cb8486833da1062b26498800fffda /emacs | |
parent | zsh: fly variables are managed by environment.d (diff) | |
download | emacs.d-874d638db9fc0b36b6c1176252c77ed2feba046b.tar.gz |
emacs: try to fix prompt
Diffstat (limited to 'emacs')
-rw-r--r-- | emacs/custom/fcuny-eshell.el | 6 |
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 |