Commit Diff

commit - 56142b9f5181543f7d2ac1ab314fb4f8da9c7491
commit + 24b533224c84158e85343d16141f8a2cb5c800e8
blob - 98368893706ebf55280e6d7399adac5e1e2fb621
blob + a938242f96319aabd0fce3fdf99f2139790f3156
@@ -3,4 +3,21 @@
 vmd is an Emacs package to interact with [OpenBSD' vmd][vmd].
+### vterm integration
+To use vterm (or any other packages really) to handle a shell for the
+console, `vmd-console-function` must point to a function that accepts
+two parameters, name and cmd, and execute cmd (a list of strings) in
+your preferred terminal.  By default, `ansi-term` (bundled with Emacs)
+is used, so it's easy to switch to vterm:
+(defun my/vmd-vterm (name cmd)
+  (let ((vterm-shell (mapconcat #'shell-quote-argument cmd " "))
+        (vterm-buffer-name (concat "*" name "*")))
+    (vterm)))
+(setq vmd-console-function #'my/vmd-vterm)