eshell: things I’ve totally underestimated

by debianjoe

2014-11-03-031246_1024x768_scrot

I’ve long been a fan of zsh.  I’ve extended my shell to cover a wide array of tiny little quality of life functions and I still think the world of it.  That being said, I have practically gone fully over to using the emacs included eshell for the past few weeks.  For those of you who are hardcore vim guys or not into lisp hacking, then most of this won’t apply to you…but I’ll share a joke I heard recently at the end of this post just for you.

For those who ARE into emacs and lisp hacking, I cannot tell you how much fun eshell can be.  It’s one of those things that has been there, and I’ve used it a few times before while playing with shell inside emacs before I swapped over to ansi-term and used my normal zsh…but I had missed a huge reason to use it.  It is an interactive shell that accepts elisp directly from command-line in addition to performing most standard shell functions with similar behavior to bash.

This isn’t a big deal as far as normal shell functions are concerned, `ls` still looks the same here, but to see some difference at the eshell prompt, type in `current-buffer`.  Better yet, enclose the little commands in parenthesis.  Try: (window-list).  Not too big of a deal, except that it looks a whole lot like an evaluated (window-list) in emacs’ scratch buffer.  When it really hit me what I was missing is when I started using load-file from it with short little lisp snippets that I was playing with.  Eshell, like anything emacs, is highly extensible via emacs-lisp.  Right now, mine behaves like the plan9 smart-shell, and I’m still adding more little quality of life things to it as we speak.  The more I hack away at it, the more I love it.  While it starts off simple, it can be made into a monster!

Ok, I promised the vim guys something funny, so here’s a quote I heard the other day:

I switched from emacs to vim about 3 months ago and haven’t gone back since…mostly because I can’t figure out how to close it.

Advertisements