Add run-command comint runner

This commit is contained in:
Jeremy Dormitzer 2024-09-05 06:18:59 -06:00
parent ad1ba5f7fa
commit d3a2bcd6f5

View File

@ -39,9 +39,17 @@
(advice-add 'run-command :around #'run-command-advice)
(advice-add 'run-command-core-run :around #'run-command-core-run-advice)
(defun run-command-runner-compile-comint (command-line _buffer-base-name output-buffer)
"Command runner that runs COMMAND-LINE in a comint buffer."
(with-current-buffer output-buffer
(compilation-mode)
(compilation-start command-line t)
(setq-local comint-process-echoes t)))
(defun run-command-with-runner (runner)
(interactive (list (completing-read "Runner: "
'(run-command-runner-compile
run-command-runner-compile-comint
run-command-runner-vterm
run-command-runner-term
run-command-runner-eat)