[EShell] More playing around with the prompt
This commit is contained in:
parent
191e4f84ca
commit
631fbcfd13
|
@ -41,22 +41,22 @@
|
||||||
(defun eshell/default-prompt-function ()
|
(defun eshell/default-prompt-function ()
|
||||||
"A prompt for eshell of the form
|
"A prompt for eshell of the form
|
||||||
|
|
||||||
┌[$USER@$HOST] [$PWD]
|
┌─[$USER@$HOST] [$PWD]
|
||||||
└──
|
└─
|
||||||
|
|
||||||
"
|
"
|
||||||
(let ((head-face '(:foreground "#859900")))
|
(let ((head-face '(:foreground "#859900")))
|
||||||
(format (concat (propertize "┌" 'face head-face)
|
(format (concat (propertize "┌─" 'face head-face)
|
||||||
"[%s@%s] [%s]\n"
|
"[%s@%s] [%s]\n"
|
||||||
(propertize "└──" 'face head-face)
|
(propertize "└─" 'face head-face)
|
||||||
" ")
|
(propertize " " 'face '(:weight bold)))
|
||||||
(user-login-name)
|
(user-login-name)
|
||||||
(system-name)
|
(system-name)
|
||||||
(propertize (abbreviate-file-name (eshell/pwd))
|
(propertize (abbreviate-file-name (eshell/pwd))
|
||||||
'face '(:foreground "#dc322f")))))
|
'face '(:foreground "#dc322f")))))
|
||||||
|
|
||||||
(setq eshell-prompt-function #'eshell/default-prompt-function
|
(setq eshell-prompt-function #'eshell/default-prompt-function
|
||||||
eshell-prompt-regexp "└── "
|
eshell-prompt-regexp "└─ "
|
||||||
eshell-highlight-prompt nil)
|
eshell-highlight-prompt nil)
|
||||||
|
|
||||||
(add-hook 'eshell-mode-hook
|
(add-hook 'eshell-mode-hook
|
||||||
|
|
Loading…
Reference in New Issue