From dfda243734ce34346b48201782315aa849b3e2c6 Mon Sep 17 00:00:00 2001 From: Charles Choi Date: Tue, 10 Dec 2024 12:06:55 -0800 Subject: [PATCH] Add shell-command to Tools menu (`casual-editkit-tools-tmenu`) - Added synchronous and asynchronous variants of `shell-command` --- lisp/casual-editkit-utils.el | 2 ++ tests/test-casual-editkit-utils.el | 4 ++++ 2 files changed, 6 insertions(+) diff --git a/lisp/casual-editkit-utils.el b/lisp/casual-editkit-utils.el index 86fae37..e236b8b 100644 --- a/lisp/casual-editkit-utils.el +++ b/lisp/casual-editkit-utils.el @@ -578,6 +578,8 @@ Commands pertaining to invoking different tools can be accessed here." ["Tools" ["Shells & REPLs" ("s" "Shell" shell) + ("!" "Shell Command…" shell-command) + ("&" "Shell Command &…" async-shell-command) ("e" "Eshell" eshell) ("i" "IELM" ielm) ("t" "term" term) diff --git a/tests/test-casual-editkit-utils.el b/tests/test-casual-editkit-utils.el index 41c83f5..00ee75e 100644 --- a/tests/test-casual-editkit-utils.el +++ b/tests/test-casual-editkit-utils.el @@ -489,6 +489,8 @@ (casualt-editkit-setup tmpfile) (cl-letf (;;((symbol-function #') (lambda () t)) (casualt-mock #'shell) + (casualt-mock #'shell-command) + (casualt-mock #'async-shell-command) (casualt-mock #'eshell) (casualt-mock #'ielm) (casualt-mock #'term) @@ -507,6 +509,8 @@ (let ((test-vectors '((:binding "s" :command shell) + (:binding "!" :command shell-command) + (:binding "&" :command async-shell-command) (:binding "e" :command eshell) (:binding "i" :command ielm) (:binding "t" :command term)