15.08.2023
шеллы в emacs
Что есть что :)
The differences between eshell, shell, term and vterm:
- eshell
- shell completely implemented in Emacs Lisp. It is well-integrated in Emacs and it runs on Windows. It does not support command line tools that require terminal manipulation capabilities (e.g., ncdu, nmtui, …).
- shell
- interfaces with a standard shell (e.g., bash). It reads an input from Emacs, sends it to the shell, and reports back the output from the shell. As such, like eshell, it does not support interactive commands, especially those that directly handle how the output should be displayed (e.g., htop).
- term
- terminal emulator written in elisp. term runs a shell (similarly to other terminal emulators like Gnome Terminal) and programs can directly manipulate the output using escape codes. Hence, many interactive applications (like the one aforementioned) work with term. However, term and ansi-term do not implement all the escapes codes needed, so some programs do not work properly. Moreover, term has inferior performance compared to standalone terminals, especially with large bursts of output.
- vterm
- like term it is a terminal emulator. Unlike term, the core of vterm is an external library written in C, libvterm. For this reason, vterm outperforms term and has a nearly universal compatibility with terminal applications.
Ссылки:
- https://www.masteringemacs.org/article/running-shells-in-emacs-overview - шеллы в емаксе.
- https://www.masteringemacs.org/article/executing-shell-commands-emacs - выполнение консольных команд в емаксе.
- https://www.opennet.ru/docs/RUS/gnuemacs/emacs_28.html - сборка и тестирование прог в емаксе.
- https://github.com/IvanMalison/term-manager
- https://www.emacswiki.org/emacs/ExecuteExternalCommand
- https://github.com/akermu/emacs-libvterm - самый шелловый шелл. Если мне не хватит term-а (и теперь я знаю, что обычно мне нужен именно term), то ставить вот это.
На сейчас vterm особо не трогаю, хотя в наличии есть. Чаще всего shell. Стала реже пользоваться urxvt из yeahconsole, чаще прямо тут. И если переименовывать буфер с shell под проект, например, то норм получается использовать несколько.
- https://github.com/suonlight/multi-vterm - Managing multiple vterm buffers in Emacs.
- https://github.com/elizagamedev/shell-command-x.el - занятные плюшки и интересные ссылки на аналоги. 2023-08-15
То, что копала для запуска шеллового в емаксе
- https://www.emacswiki.org/emacs/ComintMode
- https://masteringemacs.org/article/comint-writing-command-interpreter
- https://emacs.stackexchange.com/questions/66178/how-to-execute-shell-command-with-piping-in-elisp
- http://www.gnu.org/software/emacs/manual/html_node/elisp/Process-Buffers.html
- http://www.gnu.org/software/emacs/manual/html_node/elisp/Output-from-Processes.html
- http://www.gnu.org/software/emacs/manual/html_node/elisp/Asynchronous-Processes.html
- http://www.gnu.org/software/emacs/manual/html_node/elisp/Subprocess-Creation.html
- http://www.gnu.org/software/emacs/manual/html_node/elisp/Shell-Arguments.html
- http://www.gnu.org/software/emacs/manual/html_node/elisp/Processes.html
- https://stackoverflow.com/questions/1453956/which-shell-command-in-emacs-lisp
Все посты