     ;; Sending special keys to the terminal:
     (define-key map (kbd "C-c")     nil)
     (define-key map (kbd "C-c C-c") (pjones:term-send-char [?\C-c]))
+    (define-key map (kbd "C-c C-d") #'pjones:term-insert-directory)
+    (define-key map (kbd "C-c C-e") (pjones:term-send-char [?\C-x ?\C-e]))
+    (define-key map (kbd "C-c C-o") (pjones:term-send-char [?\C-o]))
+    (define-key map (kbd "C-c C-x") (pjones:term-send-char [?\C-x]))
     (define-key map (kbd "C-c C-z") (pjones:term-send-char [?\C-z]))
     (define-key map (kbd "C-c M-x") (pjones:term-send-char [escape ?x]))
     (define-key map (kbd "C-c C-q") #'pjones:term-quoted-insert)


(defun pjones:term-mode-hook ()
  "Hook run after starting a new terminal."

  ;; Some variables that term-mode doesn't initialize but uses :(
  (setq term-ansi-at-dir default-directory
        term-ansi-at-host (system-name)
        term-ansi-at-user (user-real-login-name)
        term-prompt-regexp "^[^❯]+❯ *"
        term-line-mode-buffer-read-only t)

  ;; Keep things Emacs-like:

     (seq-doseq (char ,chars)
       (term-send-raw-string (make-string 1 char)))))

(defun pjones:term-insert-directory ()
  "Prompt for a directory and insert it into the term buffer."
  (interactive)
  (let ((dir (read-directory-name "Dir: ")))
    (term-send-raw-string dir)))

(defun pjones:remove-dead-term (&rest args)
  "Clean up after a dead terminal.
Ignores ARGS."
