Comment by susam

5 months ago

Unfortunately, Eshell does not have job control. Quoting from <https://www.gnu.org/software/emacs/manual/html_mono/eshell.h...>:

> A command invocation followed by an ampersand (&) will be run in the background. Eshell has no job control, so you can not suspend or background the current process, or bring a background process into the foreground. That said, background processes invoked from Eshell can be controlled the same way as any other background process in Emacs.

For things like this, we would have to switch to something like M-x shell or even M-x ansi-term. In Emacs, we have an assortment of shells and terminal implementations. As a long time Emacs user, I know when to use which, so it does not bother me. However, I can imagine how this might feel cumbersome for newer Emacs users.

In fact, this is one of the reasons I think your project is fantastic. It offers some of the Eshell-like experience, and more, to non-Emacs users, which is very compelling!

> Unfortunately, Eshell does not have job control.

I wonder why, after all these years, nobody has added it?

If someone (not me) made a patch that did, would the GNU Emacs maintainers accept it?

  • I think it comes down to that emacs itself has facilities for managing the background processes, and eshell in general tends to defer back to the surrounding editor for a lot of functionality.

    So if there's an "emacs" way of doing things, generally eshell delegates to that, instead of rolling its own.

  • Note this part:

    > That said, background processes invoked from Eshell can be controlled the same way as any other background process in Emacs

    I haven't used Eshell much, but this makes a simple "command &" arguably much saner than in a traditional Unix shell.

    I imagine that a new feature would be accepted only if someone can make it play nice with existing features. And in case of job control, I have a bad feeling about the complexity involved.