I have seen several proposals to run more than one instance of eshell (or shell) at a time. See here and here. However, they are inconvenient in my view, using peculiar key chords and forcing you to actively invent ad-hoc buffer names. I'd rather like to have a simple DWIM-like function, e.g. new-eshell, that creates a fresh instance of eshell in an automatically named buffer. Buffer names should be numbered consecutively, i.e., *eshell1*, *eshell2* etc.

Who can help?

1 Answer 1


This function uses the default naming conventions of eshell when called with a non-numeric prefix argument (e.g. C-u M-x eshell), so consecutive calls create buffers titled, e.g., *eshell*<2>*

(defun eshell/new ()
  (eshell t))

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.