As I explained in the above-linked post, I use lots of eshells and wanted a way to easily switch between them.
I made a few enhancements since I last wrote about the system though: The biggest is that I made it sort the shell buffers based on how close they are to the directory of the current buffer. This small change made it way more useful to me: Previously, it was showing the buffers in the order they were created, essentially, which meant that every time I wanted to switch to a shell, I’d have to search to find the correct one.
After this enhancement though, I can usually just hit enter to select the first candidate, since it will be the one for the current project.
In the process of submitting the package to MELPA, I got some nice feedback – specifically, it was pointed out to me that there wasn’t actually anything eshell-specific in what it did & if I changed the line where it searched for buffers to also find
shell ones, it worked for that as well!
I made a few little changes, re-named the package to be more generic, and now it works for shell-mode and eshell-mode!
I learned a lot of little things about package Emacs libraries in the process and found it very fun; I shall definitely be trying to build more in the future!
The pull request to add this package to MELPA is still in-process, but you can still check it out and install it manually if such a thing sounds useful to you.
Update: it is now available on MELPA!