Switching to emacs eshell

Posted on December 28, 2017
Tags: emacs, eshell

Using a terminal inside emacs never felt completely convenient to me. I remember trying packages like multi-term, better-shell, and shell-pop. There was always something I disliked, e.g. colors, input modes, or the absence of tab functionality. In an external terminal I, however, missed all the emacs keybindings. I have tried eshell before, but didn’t get the idea and quickly stopped using it.

After watching Howard Abraham’s video Introduction to EShell - YouTube I reread his articles Eschewing Zshell for Emacs Shell and Presenting the Eshell and I started to use eshell again.

I especially like eshell’s for-loop in combination with the “modifiers”. (M-x eshell-display-modifier-help), with which you can do something like

for x in ls *.org {concat $x(:r) "." $x(:e:U)}

The eshell documentation is not totally complete, but Howard Abraham’s post got me quite far.

There is still something I would very much like to have: the possibility to use eshell in an org-babel source block. Unfortunately, there is only the standard shell compatibility and I consider trying to implement eshell functionality myself. I know eshell converts the commands into the corresponding emacs-lisp code and executes this, so somewhere there should be a ready-to-use function for ob-eshell execution.