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.
Visual commands only differs from normal commands by the escapes code they use (like enabling the alternate buffer, clearing the screen,..). Eshell can't deal with those (and shouldn't as it's a shell, not a terminal). Eat adds a layer that does process those escape codes and that's all you need to handle visual commands.
There's some miscommunication here.
> How does eat detect a visual command in eshell?
eat-eshell-mode doesn't detect visual commands and launch a separate eat buffer, like eshell-visual-commands do. It filters all process output in eshell and handles term codes. It turns the eshell buffer itself into a terminal, so that vim or whatever runs in eshell.
> It sounds from your description like vterm is faster than eat.
vterm is faster than eat, but a dedicated eat buffer is fast enough for most common TUIs. An eshell buffer with eat-eshell-mode is slower.