From ac3618ab5b3c00a085ea554b152977c6411fb7ca Mon Sep 17 00:00:00 2001 From: Aryadev Chavali Date: Sat, 15 Aug 2020 11:15:32 +0100 Subject: ~eshell: cleanup description, +toggle-eshell Using the toggle functionality I defined earlier, create a toggle eshell setup --- Emacs/.config/emacs/config.org | 27 ++++++++++++++------------- 1 file changed, 14 insertions(+), 13 deletions(-) (limited to 'Emacs/.config') diff --git a/Emacs/.config/emacs/config.org b/Emacs/.config/emacs/config.org index c9ff9d5..23d6c3e 100644 --- a/Emacs/.config/emacs/config.org +++ b/Emacs/.config/emacs/config.org @@ -685,27 +685,28 @@ It may be argued that Emacs integrates within itself many of the functionalities that one would use within a shell or terminal. Stuff like compilation, file management, large scale text manipulation could be done through Emacs' own tools (=compile=, =dired= and =occur= come -to mind). +to mind). However, I'd argue that eshell's greatest ability comes from +it's separation (or perhaps better phrased, *integration*) of two +'parsers': the Lisp parser and the Shell parser. With these parsers +you can mix and match at will for use in the shell, which grants +greater power than many shells I know of. -However, the Eshell is still a useful tool even if you don't use it -for classical shell tasks. As it is integrated with Emacs, it actually -has two language parsers: one for standard shell scripting [echo -"Hello, world"] and one for Emacs lisp [(message "Hello, -world!")]. This means that eshell is essentially just a REPL for Emacs -lisp with extra shell capabilities. You can use programs defined in -any language (as long as it's in path and executable) and also run -lisp functions. This allows for mix-and-match capabilities when -needed, so cognitive load decreases as you can rely on either parsers -when necessary. +Setup a function that /toggles/ the eshell window rather than +just opening it via =+dx/toggle-buffer=. #+BEGIN_SRC emacs-lisp (use-package eshell :general (leader - "t" #'eshell) + "tt" #'+shell/toggle-eshell) :init (setq eshell-cmpl-ignore-case t - eshell-cd-on-directory t)) + eshell-cd-on-directory t) + :config + (defun +shell/toggle-eshell () + (interactive) + (+dx/toggle-buffer "*eshell*" #'eshell))) + #+END_SRC * Window management Window management is really important. I find the default window -- cgit v1.2.3-13-gbd6f