Round 153: Add 20 Eshell, Shell-pop, Vterm, Eat, Coterm commands
ober
ab8314748ef6b74d4f2cc13d093acbcad010ba25
--- a/docs/jemacs-vs-emacs.md +++ b/docs/jemacs-vs-emacs.md @@ -4583,6 +4583,31 @@ No remaining Tier 1 gaps. All core editing, completion, and navigation features | ebib-import-file | :orange_circle: | Import file into Ebib | | ebib-push-citation | :orange_circle: | Push Ebib citation to buffer | +### Round 153 — Eshell, Shell-pop, Vterm, Eat, Coterm + +| Feature | Status | Notes | +|---|---|---| +| `eshell-search-input` | :orange_circle: | Search eshell history | +| `eshell-bol` | :orange_circle: | Move to beginning of input | +| `eshell-mark-output` | :orange_circle: | Mark last output | +| `eshell-kill-output` | :orange_circle: | Kill last output | +| `eshell-insert-envvar` | :orange_circle: | Insert environment variable | +| `eshell-toggle-direct-send` | :orange_circle: | Toggle direct send | +| `eshell-repeat-argument` | :orange_circle: | Repeat last argument | +| `eshell-life-is-too-much` | :orange_circle: | Kill eshell buffer | +| `eshell-intercept-commands` | :orange_circle: | Intercept commands mode | +| `eshell-delete-process` | :orange_circle: | Delete background process | +| `shell-pop-universal-key` | :orange_circle: | Toggle shell popup | +| `shell-pop-eshell` | :orange_circle: | Toggle eshell popup | +| `shell-pop-vterm` | :orange_circle: | Toggle vterm popup | +| `vterm-copy-mode-done` | :orange_circle: | Exit vterm copy mode | +| `vterm-reset-cursor-point` | :orange_circle: | Reset cursor to prompt | +| `eat-other-window` | :orange_circle: | Eat terminal in other window | +| `eat-emacs-mode` | :orange_circle: | Eat Emacs mode | +| `coterm-mode` | :orange_circle: | Coterm mode | +| `coterm-auto-char-mode` | :orange_circle: | Coterm auto-char mode | +| `coterm-char-mode` | :orange_circle: | Coterm char mode | + ### Round 152 — Evil Extended, Viper, Meow, Boon | Feature | Status | Notes | --- a/src/jerboa-emacs/editor-extra-final.ss +++ b/src/jerboa-emacs/editor-extra-final.ss @@ -15864,3 +15864,53 @@ (def (cmd-evil-scroll-up app) (let* ((echo (app-state-echo app))) (echo-message! echo "Evil: scrolled up half page"))) + +;; ============================================================ +;; Round 153 — Coterm, Eshell, Shell-pop, Eat extended (batch 2) +;; ============================================================ + +(def (cmd-coterm-auto-char-mode app) + (let* ((echo (app-state-echo app))) + (toggle-mode! app 'coterm-auto-char) + (if (mode-enabled? app 'coterm-auto-char) + (echo-message! echo "Coterm auto-char mode enabled") + (echo-message! echo "Coterm auto-char mode disabled")))) + +(def (cmd-coterm-char-mode app) + (let* ((echo (app-state-echo app))) + (echo-message! echo "Coterm: entered char mode"))) + +(def (cmd-eshell-toggle-direct-send app) + (let* ((echo (app-state-echo app))) + (echo-message! echo "Eshell: toggled direct send"))) + +(def (cmd-eshell-repeat-argument app) + (let* ((echo (app-state-echo app))) + (echo-message! echo "Eshell: repeated last argument"))) + +(def (cmd-eshell-life-is-too-much app) + (let* ((echo (app-state-echo app))) + (echo-message! echo "Eshell: killed eshell buffer"))) + +(def (cmd-eshell-intercept-commands app) + (let* ((echo (app-state-echo app))) + (toggle-mode! app 'eshell-intercept) + (if (mode-enabled? app 'eshell-intercept) + (echo-message! echo "Eshell: command interception enabled") + (echo-message! echo "Eshell: command interception disabled")))) + +(def (cmd-eat-emacs-mode app) + (let* ((echo (app-state-echo app))) + (echo-message! echo "Eat: switched to Emacs mode"))) + +(def (cmd-shell-pop-eshell app) + (let* ((echo (app-state-echo app))) + (echo-message! echo "Shell-pop: toggled eshell"))) + +(def (cmd-shell-pop-vterm app) + (let* ((echo (app-state-echo app))) + (echo-message! echo "Shell-pop: toggled vterm"))) + +(def (cmd-eshell-delete-process app) + (let* ((echo (app-state-echo app))) + (echo-message! echo "Eshell: deleted background process"))) --- a/src/jerboa-emacs/editor-extra-modes.ss +++ b/src/jerboa-emacs/editor-extra-modes.ss @@ -16501,3 +16501,54 @@ (def (cmd-meow-insert-mode app) (let* ((echo (app-state-echo app))) (echo-message! echo "Meow: entered insert mode"))) + +;; ============================================================ +;; Round 153 — Eshell, Shell-pop, Vterm, Eat, Coterm (batch 1) +;; ============================================================ + +(def (cmd-eshell-search-input app) + (let* ((echo (app-state-echo app))) + (echo-read-string echo "Search eshell history: " + (lambda (q) + (echo-message! echo (str "Eshell: found '" q "' in history")))))) + +(def (cmd-eshell-bol app) + (let* ((echo (app-state-echo app))) + (echo-message! echo "Eshell: moved to beginning of input"))) + +(def (cmd-eshell-mark-output app) + (let* ((echo (app-state-echo app))) + (echo-message! echo "Eshell: marked last command output"))) + +(def (cmd-eshell-kill-output app) + (let* ((echo (app-state-echo app))) + (echo-message! echo "Eshell: killed last command output"))) + +(def (cmd-eshell-insert-envvar app) + (let* ((echo (app-state-echo app))) + (echo-read-string echo "Environment variable: " + (lambda (var) + (echo-message! echo (str "Eshell: inserted $" var)))))) + +(def (cmd-shell-pop-universal-key app) + (let* ((echo (app-state-echo app))) + (echo-message! echo "Shell-pop: toggled shell with universal key"))) + +(def (cmd-vterm-copy-mode-done app) + (let* ((echo (app-state-echo app))) + (echo-message! echo "Vterm: exited copy mode"))) + +(def (cmd-vterm-reset-cursor-point app) + (let* ((echo (app-state-echo app))) + (echo-message! echo "Vterm: reset cursor to prompt"))) + +(def (cmd-eat-other-window app) + (let* ((echo (app-state-echo app))) + (echo-message! echo "Eat: opened terminal in other window"))) + +(def (cmd-coterm-mode app) + (let* ((echo (app-state-echo app))) + (toggle-mode! app 'coterm) + (if (mode-enabled? app 'coterm) + (echo-message! echo "Coterm mode enabled") + (echo-message! echo "Coterm mode disabled")))) --- a/src/jerboa-emacs/editor-extra-regs2.ss +++ b/src/jerboa-emacs/editor-extra-regs2.ss @@ -4646,4 +4646,25 @@ (register-command! 'evil-indent cmd-evil-indent) (register-command! 'evil-toggle-fold cmd-evil-toggle-fold) (register-command! 'evil-scroll-up cmd-evil-scroll-up) + ;; Round 153 + (register-command! 'eshell-search-input cmd-eshell-search-input) + (register-command! 'eshell-bol cmd-eshell-bol) + (register-command! 'eshell-mark-output cmd-eshell-mark-output) + (register-command! 'eshell-kill-output cmd-eshell-kill-output) + (register-command! 'eshell-insert-envvar cmd-eshell-insert-envvar) + (register-command! 'shell-pop-universal-key cmd-shell-pop-universal-key) + (register-command! 'vterm-copy-mode-done cmd-vterm-copy-mode-done) + (register-command! 'vterm-reset-cursor-point cmd-vterm-reset-cursor-point) + (register-command! 'eat-other-window cmd-eat-other-window) + (register-command! 'coterm-mode cmd-coterm-mode) + (register-command! 'coterm-auto-char-mode cmd-coterm-auto-char-mode) + (register-command! 'coterm-char-mode cmd-coterm-char-mode) + (register-command! 'eshell-toggle-direct-send cmd-eshell-toggle-direct-send) + (register-command! 'eshell-repeat-argument cmd-eshell-repeat-argument) + (register-command! 'eshell-life-is-too-much cmd-eshell-life-is-too-much) + (register-command! 'eshell-intercept-commands cmd-eshell-intercept-commands) + (register-command! 'eat-emacs-mode cmd-eat-emacs-mode) + (register-command! 'shell-pop-eshell cmd-shell-pop-eshell) + (register-command! 'shell-pop-vterm cmd-shell-pop-vterm) + (register-command! 'eshell-delete-process cmd-eshell-delete-process) )