diff --git a/modules/emacs/eshell/autoload/eshell.el b/modules/emacs/eshell/autoload/eshell.el index d24488d40..edd2f7ad0 100644 --- a/modules/emacs/eshell/autoload/eshell.el +++ b/modules/emacs/eshell/autoload/eshell.el @@ -63,7 +63,9 @@ ;;;###autoload (defun +eshell-prompt () "Generate the prompt string for eshell. Use for `eshell-prompt-function'." - (concat (propertize (abbreviate-file-name (eshell/pwd)) 'face '+eshell-prompt-pwd) + (concat (if (bobp) "" "\n") + (propertize (abbreviate-file-name (shrink-path-file (eshell/pwd))) + 'face '+eshell-prompt-pwd) (propertize (+eshell--current-git-branch) 'face '+eshell-prompt-git-branch) (propertize " λ " 'face '+eshell-prompt-char))) diff --git a/modules/emacs/eshell/config.el b/modules/emacs/eshell/config.el index 86f34264c..e87bde4f0 100644 --- a/modules/emacs/eshell/config.el +++ b/modules/emacs/eshell/config.el @@ -91,3 +91,7 @@ redefines its keys every time `eshell-mode' is enabled." (def-package! eshell-up :commands (eshell-up eshell-up-peek)) + + +(def-package! shrink-path + :commands shrink-path-file) diff --git a/modules/emacs/eshell/packages.el b/modules/emacs/eshell/packages.el index d2ca8a2ec..fcaed73f5 100644 --- a/modules/emacs/eshell/packages.el +++ b/modules/emacs/eshell/packages.el @@ -2,3 +2,4 @@ ;;; emacs/eshell/packages.el (package! eshell-up) +(package! shrink-path)