Add emacs console helper scripts

This commit is contained in:
2025-09-08 21:16:56 +02:00
parent 7279a53bc0
commit 7cc80e8cf4
14 changed files with 385 additions and 16 deletions

22
bin/emacs-terminal Executable file
View File

@@ -0,0 +1,22 @@
#!/bin/bash
# Launch Emacs in terminal mode with built-in terminal emulator
# Accepts optional shell command argument
if [ $# -eq 0 ]; then
# No arguments, start default shell
EMACS_NO_DESKTOP=1 emacs -nw --eval "(progn
(if (fboundp 'vterm)
(vterm)
(if (fboundp 'term)
(term (getenv \"SHELL\"))
(eshell))))"
else
# Run specified command
CMD="$*"
EMACS_NO_DESKTOP=1 emacs -nw --eval "(progn
(if (fboundp 'vterm)
(vterm)
(if (fboundp 'term)
(term \"$CMD\")
(eshell))))"
fi