all repos — nixfiles @ 8c56a91570ec8fe9839378851878f578968e5dfb

System and user configuration, managed by nix and home-manager

emacs: close eshell buffer and window when running `exit`

Alan Pearce
commit

8c56a91570ec8fe9839378851878f578968e5dfb

parent

b8c921a8025e1d5aaca8a25881edcb400fba0d35

1 file changed, 6 insertions(+), 4 deletions(-)

jump to
M user/emacs/init.eluser/emacs/init.el
@@ -697,10 +697,12 @@ :functions (eshell/pwd)
:init (progn (with-eval-after-load 'evil-ex (evil-ex-define-cmd "esh[ell]" #'eshell))) - :config (setq eshell-prompt-function (lambda () - (concat (eshell/pwd) "\n$ ")) - eshell-prompt-regexp "^[$][[:blank:]]" - eshell-cmpl-cycle-completions nil)) + :config (progn + (setq eshell-prompt-function (lambda () + (concat (eshell/pwd) "\n$ ")) + eshell-prompt-regexp "^[$][[:blank:]]" + eshell-cmpl-cycle-completions nil) + (add-hook 'eshell-exit-hook #'evil-window-delete))) (use-package eshell-toggle :after projectile