diff options
Diffstat (limited to 'lisp/init-eshell.el')
-rw-r--r-- | lisp/init-eshell.el | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/lisp/init-eshell.el b/lisp/init-eshell.el new file mode 100644 index 0000000..952989a --- /dev/null +++ b/lisp/init-eshell.el @@ -0,0 +1,23 @@ +;;; init-eshell.el --- configure eshell -*- lexical-binding:t -*- +;;; Commentary: +;;; Code: + +(defun mpolden/eshell-other-window () + "Create a new Eshell buffer in another window. + +If `default-directory' is determined to be a project by +`project-current', the Eshell buffer will be created with +`project-shell' instead of `eshell'." + (interactive) + (let ((buf (if (project-current) + (project-eshell) + (eshell)))) + (switch-to-buffer (other-buffer buf)) + (switch-to-buffer-other-window buf))) + +(use-package eshell + :bind (("C-c e" . mpolden/eshell-other-window))) + +(provide 'init-eshell) + +;;; init-eshell.el ends here |