M-n, M-p. M-r for searching on past commands. C-c c-n/C-p for next/previous prompt. C-c C-r to scroll to focus on output.
Having switched recently to Emacs, my current issue is how to get Emacs shell history saved properly for my other shell buffers, and getting completions from shell (not Emacs) to work, planning to try MisTTY soon.
I've retrained muscle memory to use C-c C-l (which I rebind to `consult-history'). This gives me a fuzzy-searchable list of all my history. I find that I prefer this to a normal shell's C-r, because with my vertical completion setup I can see multiple matches for my search simultaneously.
Personally, while living in Emacs (EXWM), I still can't live on eshell, the issue is "the terminal", too many commands are simply uncomfortable to use in eshell while run smoothly in a real terminal.
I've also tried some new shells, the one I last more is xonsh, but generally I came back to zsh even if I use in general much less the shell than before thanks to Emacs, the 2D shell.
Emacs completion also it's very nice for text, but slower than tab-cycle in zsh as well and for quick commands that's matter.
Have you tried Eat[0]? It's a reasonably fast terminal emulator that integrates with Eshell so that all commands run in Eshell have full terminal emulation (but they're still run in the original Eshell buffer, which makes it better than `eshell-visual-commands'). I haven't had any terminal emulation problems since switching to it.
With regards to completion, I use corfu, which gives me nice inline popups. I use the bash-completion package, so I don't have issues with programs that don't provide Eshell completions (which are basically all of them).
You have to turn on eat-eshell-mode to enable Eat's terminal emulation in eshell.
It runs full-fledged TUIs like vim and ncmpcpp in Eshell slowly, but is good enough for quick fzf uses. It's perfectly fine for "small" dynamic elements like the spinners and progress bars used by package managers.
Just remember to use system pipes (with "*|") instead of Elisp pipes (with "|") if you're piping data into an interactive TUI application like fzf in Eshell.
How does eat detect a visual command in eshell? I use vterm in Emacs for visual commands like nvim and htop. But it's triggered manually with a simple custom prefix command (just 'v') added to the actual command. I wonder if that trigger could be automated. It sounds from your description like vterm is faster than eat. If so, a similar automatic trigger for vterm could be very beneficial.
I never could get used to different key bindings. vterm in Emacs, with a few workarounds, works beautifully for me.
Discussed previously: https://news.ycombinator.com/item?id=14825607
I tried using shell mode in emacs, but my fingers use control-p and control-r on the terminal shell and I fail.
instead of searching backwards in commands, it does it in the buffer.
How do people deal with this?
M-n, M-p. M-r for searching on past commands. C-c c-n/C-p for next/previous prompt. C-c C-r to scroll to focus on output.
Having switched recently to Emacs, my current issue is how to get Emacs shell history saved properly for my other shell buffers, and getting completions from shell (not Emacs) to work, planning to try MisTTY soon.
I've retrained muscle memory to use C-c C-l (which I rebind to `consult-history'). This gives me a fuzzy-searchable list of all my history. I find that I prefer this to a normal shell's C-r, because with my vertical completion setup I can see multiple matches for my search simultaneously.
remap the keys?
Personally, while living in Emacs (EXWM), I still can't live on eshell, the issue is "the terminal", too many commands are simply uncomfortable to use in eshell while run smoothly in a real terminal.
I've also tried some new shells, the one I last more is xonsh, but generally I came back to zsh even if I use in general much less the shell than before thanks to Emacs, the 2D shell.
Emacs completion also it's very nice for text, but slower than tab-cycle in zsh as well and for quick commands that's matter.
Have you tried Eat[0]? It's a reasonably fast terminal emulator that integrates with Eshell so that all commands run in Eshell have full terminal emulation (but they're still run in the original Eshell buffer, which makes it better than `eshell-visual-commands'). I haven't had any terminal emulation problems since switching to it.
[0]: https://codeberg.org/akib/emacs-eat
With regards to completion, I use corfu, which gives me nice inline popups. I use the bash-completion package, so I don't have issues with programs that don't provide Eshell completions (which are basically all of them).
This is extremely helpful. I have never considered the possibility that there could be a better method to deal with emulation than visual commands.
You have no idea how much this helps me.
You have to turn on eat-eshell-mode to enable Eat's terminal emulation in eshell.
It runs full-fledged TUIs like vim and ncmpcpp in Eshell slowly, but is good enough for quick fzf uses. It's perfectly fine for "small" dynamic elements like the spinners and progress bars used by package managers.
Just remember to use system pipes (with "*|") instead of Elisp pipes (with "|") if you're piping data into an interactive TUI application like fzf in Eshell.
How does eat detect a visual command in eshell? I use vterm in Emacs for visual commands like nvim and htop. But it's triggered manually with a simple custom prefix command (just 'v') added to the actual command. I wonder if that trigger could be automated. It sounds from your description like vterm is faster than eat. If so, a similar automatic trigger for vterm could be very beneficial.
I agree with the assessment about eshell. I use eshell for one thing only—quick terminal sessions in the same directory as the file I'm editing.