Skip to content

Commit

Permalink
Improve example
Browse files Browse the repository at this point in the history
  • Loading branch information
tralph3 committed Apr 23, 2024
1 parent cf1c4f1 commit 1775343
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -83,10 +83,12 @@ Below is an example of a custom command type for running commands in
the [eat](https://codeberg.org/akib/emacs-eat) terminal:

```emacs-lisp
(defun conner--run-eat-command (command &rest _)
(defun conner--run-eat-command (command element &rest _)
(when (not (featurep 'eat))
(error "Eat is not installed or not loaded. Aborting"))
(eat command))
(let* ((command-name (car element))
(eat-buffer-name (concat "*conner-eat-" command-name "*")))
(eat command)))
(add-to-list 'conner-command-types-alist
`("eat" ,#'conner--run-eat-command "Run command with the eat terminal."))
Expand Down

0 comments on commit 1775343

Please sign in to comment.