mirror of
https://github.com/doomemacs/doomemacs
synced 2025-08-03 12:27:26 -05:00
eshell: fix prompt face bleeding into command
This commit is contained in:
@ -1,17 +1,12 @@
|
|||||||
;;; emacs/eshell/autoload/eshell.el -*- lexical-binding: t; -*-
|
;;; emacs/eshell/autoload/eshell.el -*- lexical-binding: t; -*-
|
||||||
|
|
||||||
;;;###autoload
|
;;;###autoload
|
||||||
(defface +eshell-prompt-pwd '((t :inherit eshell-prompt))
|
(defface +eshell-prompt-pwd '((t :inherit font-lock-constant-face))
|
||||||
"TODO"
|
"TODO"
|
||||||
:group 'eshell)
|
:group 'eshell)
|
||||||
|
|
||||||
;;;###autoload
|
;;;###autoload
|
||||||
(defface +eshell-prompt-git-branch '((t :inherit font-lock-function-name-face))
|
(defface +eshell-prompt-git-branch '((t :inherit font-lock-builtin-face))
|
||||||
"TODO"
|
|
||||||
:group 'eshell)
|
|
||||||
|
|
||||||
;;;###autoload
|
|
||||||
(defface +eshell-prompt-char '((t :inherit font-lock-constant-face))
|
|
||||||
"TODO"
|
"TODO"
|
||||||
:group 'eshell)
|
:group 'eshell)
|
||||||
|
|
||||||
@ -66,8 +61,9 @@
|
|||||||
(concat (if (bobp) "" "\n")
|
(concat (if (bobp) "" "\n")
|
||||||
(propertize (abbreviate-file-name (shrink-path-file (eshell/pwd)))
|
(propertize (abbreviate-file-name (shrink-path-file (eshell/pwd)))
|
||||||
'face '+eshell-prompt-pwd)
|
'face '+eshell-prompt-pwd)
|
||||||
(propertize (+eshell--current-git-branch) 'face '+eshell-prompt-git-branch)
|
(propertize (+eshell--current-git-branch)
|
||||||
(propertize " λ " 'face '+eshell-prompt-char)))
|
'face '+eshell-prompt-git-branch)
|
||||||
|
" λ "))
|
||||||
|
|
||||||
|
|
||||||
;;
|
;;
|
||||||
@ -231,8 +227,8 @@ delete."
|
|||||||
(defun +eshell/switch (buffer)
|
(defun +eshell/switch (buffer)
|
||||||
"Interactively switch to another eshell buffer."
|
"Interactively switch to another eshell buffer."
|
||||||
(interactive
|
(interactive
|
||||||
(let ((buffers (cl-remove-if-not (lambda (buf) (eq (buffer-local-value 'major-mode buf) 'eshell-mode))
|
(let ((buffers (doom-buffers-in-mode
|
||||||
(delete (current-buffer) (ring-elements +eshell-buffers)))))
|
'eshell-mode (delq (current-buffer) (ring-elements +eshell-buffers)))))
|
||||||
(if (not buffers)
|
(if (not buffers)
|
||||||
(user-error "No eshell buffers are available")
|
(user-error "No eshell buffers are available")
|
||||||
(list (completing-read
|
(list (completing-read
|
||||||
|
Reference in New Issue
Block a user