psibi / justl.el

Major mode for driving just files.
GNU General Public License v3.0
65 stars 13 forks source link

Run interactive tool with readline history? #49

Open jscheid opened 6 months ago

jscheid commented 6 months ago

I've got a number of interactive recipes that use readline, e.g. rails console (a REPL for Ruby on Rails).

If I run this from M-x shell then I can use C-up to fetch the previous item from the history inside the REPL, but that doesn't work with eshell. Any chance you could add a way to run a recipe with shell instead of eshell?

In fact I can't see any advantages in using eshell over shell because my understanding is that eshell features are useful mainly at the top (shell) level, not inside a running process, but I could be missing something.

psibi commented 6 months ago

but that doesn't work with eshell.

The key binding to fetch previous item from history inside eshell is M-p. And from a quick testing it does seem to work for me.

psibi commented 6 months ago

Ah, I see what you mean: You want to fetch history from you existing shell. Yeah, I think that's not supported by eshell.

This is definetely a feature that would be nice to have, although I'm not sure if I would have enough time to implment it soon. I would be to happy to accept a PR.

Regarding implementation: I think giving a defcustom option with two options: eshell and shell with default being eshell - and then implementing the required shell integration would be acceptable.