Inline error-msg in +eshell/project-root

This commit is contained in:
2024-10-16 16:31:24 +01:00
parent bec6fdbc3f
commit 7340679982

View File

@@ -40,10 +40,9 @@
"Change to directory `project-root'" "Change to directory `project-root'"
(if (project-current) (if (project-current)
(eshell/cd (list (project-root (project-current)))) (eshell/cd (list (project-root (project-current))))
(let ((error-msg (propertize "Error" 'font-lock-face (eshell/echo
'(:foreground "red")))) (format "[%s]: No project in current directory"
(eshell/echo (propertize "Error" 'font-lock-face '(:foreground "red"))))))
(format "[%s]: No project in current directory" error-msg)))))
(defun eshell/sudo-switch (&rest args) (defun eshell/sudo-switch (&rest args)
"Switch to a tramp connection sudo in the current directory" "Switch to a tramp connection sudo in the current directory"