Fix "home/~" PWD in eshell prompt
This commit is contained in:
parent
40c8d7bd0e
commit
55104b9f89
1 changed files with 5 additions and 2 deletions
|
@ -23,8 +23,11 @@
|
||||||
(defun +eshell-default-prompt ()
|
(defun +eshell-default-prompt ()
|
||||||
"Generate the prompt string for eshell. Use for `eshell-prompt-function'."
|
"Generate the prompt string for eshell. Use for `eshell-prompt-function'."
|
||||||
(concat (if (bobp) "" "\n")
|
(concat (if (bobp) "" "\n")
|
||||||
(propertize (abbreviate-file-name (shrink-path-file (eshell/pwd)))
|
(let ((pwd (eshell/pwd)))
|
||||||
'face '+eshell-prompt-pwd)
|
(propertize (if (equal pwd "~")
|
||||||
|
pwd
|
||||||
|
(abbreviate-file-name (shrink-path-file pwd)))
|
||||||
|
'face '+eshell-prompt-pwd))
|
||||||
(propertize (+eshell--current-git-branch)
|
(propertize (+eshell--current-git-branch)
|
||||||
'face '+eshell-prompt-git-branch)
|
'face '+eshell-prompt-git-branch)
|
||||||
(propertize " λ" 'face (if (zerop eshell-last-command-status) 'success 'error))
|
(propertize " λ" 'face (if (zerop eshell-last-command-status) 'success 'error))
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue