From 6c16b8bb9a66dc61ce5ead8f431e30ce7f28f2f2 Mon Sep 17 00:00:00 2001 From: Case Duckworth Date: Mon, 8 Feb 2021 16:50:43 -0600 Subject: Add eshell map --- config.org | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/config.org b/config.org index 2f6daf4..06d7844 100644 --- a/config.org +++ b/config.org @@ -2238,6 +2238,28 @@ others. (require 'gemini-write)) #+end_src +** Eshell + +I use =eshell= with Emacs, because it works both on Windows and Linux. + +*** Open an eshell or bury its buffer + +adapted from [[https://git.sr.ht/~zge/setup][zge's setup]], which might also be an interesting macro to look into +one day. + +#+begin_src emacs-lisp :noweb-ref functions + (defun acdw/eshell-or-bury () + "Start an `eshell', or bury its buffer if focused." + (interactive) + (if (string= (buffer-name) "*eshell*") ;; XXX: brittle + (bury-buffer) + (eshell))) +#+end_src + +#+begin_src emacs-lisp :noweb-ref bindings + (define-key acdw/leader "s" #'acdw/eshell-or-bury) +#+end_src + * Org mode :package: ** Install it with =straight.el= -- cgit 1.4.1-21-gabe81