Live data from Hacker News

Eschewing Zshell for Emacs Shell (2014)

howardism.org

11–20 of 26 posts

Re: Eschewing Zshell for Emacs Shell (2014)

#13
post #9

Earlier quoted context omitted.

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 T…

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.

Re: Eschewing Zshell for Emacs Shell (2014)

#14
> with EShell, you don’t need to bother with a pager, since if you received too much information, hit C-c C-p which jumps you to the top of the last command, and then C-v your way down. Or better yet, just search for what you want.

Cmd+Up - jumps you to the top of the last command

Cmd+F - just search for what you want

I don't need no stinkin' Emacs

Re: Eschewing Zshell for Emacs Shell (2014)

#15
The biggest strength of Eshell, for me, is that I can maintain some sanity in Windows environments (with or without WSL). In linuxland, it's a tougher sell. Compared to term-mode and the others, Eshell hacks better and I can fine tune my tab completions. The best thing is that my keybinds integrate better across all emacs modes when I use eshell.

Re: Eschewing Zshell for Emacs Shell (2014)

#16
post #13

Earlier quoted context omitted.

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 T…

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.

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.

Re: Eschewing Zshell for Emacs Shell (2014)

#17
post #14

> with EShell, you don’t need to bother with a pager, since if you received too much information, hit C-c C-p which jumps you to the top of the last command, and then C-v your way down. Or better yet, just search for what you want. Cmd+Up - jumps you to the top of the last command Cmd+F - just search for what you want I don't need no stinkin' Emacs

Ctrl-R to search for previous command, which I use more often. Pretty ergonomic if you do the normal Emacs thing and rebind Caps Lock to Ctrl, ironically.

Re: Eschewing Zshell for Emacs Shell (2014)

#18
post #13

Earlier quoted context omitted.

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 T…

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.

Re: Eschewing Zshell for Emacs Shell (2014)

#19
post #14

> with EShell, you don’t need to bother with a pager, since if you received too much information, hit C-c C-p which jumps you to the top of the last command, and then C-v your way down. Or better yet, just search for what you want. Cmd+Up - jumps you to the top of the last command Cmd+F - just search for what you want I don't need no stinkin' Emacs

Does the Mac terminal keep infinite lines? That's one place where Emacs shines. It just keeps EVERYTHING, other terminal emulators only keep like the last 10,000 or so which is really easy to hit if you cat too big a file.

Re: Eschewing Zshell for Emacs Shell (2014)

#20
post #17
post #14

> with EShell, you don’t need to bother with a pager, since if you received too much information, hit C-c C-p which jumps you to the top of the last command, and then C-v your way down. Or better yet, just search for what you want. Cmd+Up - jumps you to the top of the last command Cmd+F - just search for what you want I don't need no stinkin' Emacs

Ctrl-R to search for previous command, which I use more often. Pretty ergonomic if you do the normal Emacs thing and rebind Caps Lock to Ctrl, ironically.

Yes to this, but also installing fzf is life changing.
Post reply on HN