          (line-end-position))))))
 
 (defun doom--dispatch-help (&optional command desc &rest args)
-  "TODO"
+  "Display help documentation for a dispatcher command. If COMMAND and DESC are
+omitted, show all available commands, their aliases and brief descriptions."
   (if command
       (princ (doom--dispatch-format desc))
     (print! (bold "%-10s\t%s\t%s" "Command:" "Alias" "Description"))
-    (dolist (spec (sort doom-dispatch-command-alist
+    (dolist (spec (sort doom--dispatch-command-alist
                         (lambda (x y) (string-lessp (car x) (car y)))))
       (cl-destructuring-bind (command &key desc _body) spec
-        (let ((alias (car (rassq command doom-dispatch-alias-alist))))
+        (let ((aliases (cl-loop for (alias . cmd) in doom--dispatch-alias-alist
+                                if (eq cmd command)
+                                collect (symbol-name alias))))
           (print! "  %-10s\t%s\t%s"
-                  command (or alias "")
+                  command (if aliases (string-join aliases ",") "")
                   (doom--dispatch-format desc t)))))))
 
 (defun doom-dispatch (args)
-  "TODO"
+  "Invoke a dispatcher command and pass ARGS to it."
   (let ((help (equal (car args) "help")))
     (if help (pop args))
     (cl-destructuring-bind (command &key desc body)
         (let ((sym (intern (car args))))
-          (or (assq sym doom-dispatch-command-alist)
-              (assq (cdr (assq sym doom-dispatch-alias-alist)) doom-dispatch-command-alist)
+          (or (assq sym doom--dispatch-command-alist)
+              (assq (cdr (assq sym doom--dispatch-alias-alist)) doom--dispatch-command-alist)
               (error "Invalid command: %s" (car args))))
       (if help
           (apply #'doom--dispatch-help command desc (cdr args))


;; FIXME Clumsy way of registering commands, refactor!
(defmacro def-dispatcher! (command desc &rest body)
  "TODO"
  (declare (doc-string 2))
  (let* ((command (doom-enlist command))
         (cmd (car command))
         (alias (car (cdr command))))
    `(progn
       ,(when alias
          `(map-put doom-dispatch-alias-alist ',alias ',cmd))
       (map-put doom-dispatch-command-alist
                ',cmd (list :desc ,desc :body (lambda (args) ,@body))))))

;;
(def-dispatcher! run
  "Run Doom Emacs from bin/doom's parent directory.


respectively."
  (doom//byte-compile args))

(def-dispatcher! (recompile rc)
  "Re-byte-compiles outdated *.elc files."
  (doom//byte-compile args 'recompile))

