From 9f93b9ab5c5a9ad8c5eb7b7eabf1da334790b061 Mon Sep 17 00:00:00 2001 From: Case Duckworth Date: Sun, 8 Aug 2021 22:45:50 -0500 Subject: Add `eshell-buffer-name` --- init.el | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/init.el b/init.el index 30b81fc..4e4b3e4 100644 --- a/init.el +++ b/init.el @@ -393,6 +393,12 @@ like a dumbass." ;; Etc. (when (boundp 'simple-modeline--mode-line) (setq mode-line-format '(:eval simple-modeline--mode-line)))) + + (defun eshell-buffer-name () + (rename-buffer (concat "*eshell*<" (eshell/pwd) ">") t)) + + (add-hook 'eshell-directory-change-hook #'eshell-buffer-name) + (add-hook 'eshell-prompt-load-hook #'eshell-buffer-name) (:hook eshell-mode@setup eshell-arg-hist-mode)) -- cgit 1.4.1-21-gabe81