doomemacs/lisp/cli/info.el
Henrik Lissner b9933e6637
refactor!: restructure Doom core
BREAKING CHANGE: This restructures the project in preparation for Doom
to be split into two repos. Users that have reconfigured Doom's CLI
stand a good chance of seeing breakage, especially if they've referred
to any core-* feature, e.g.

  (after! core-cli-ci ...)

To fix it, simply s/core-/doom-/, i.e.

  (after! doom-cli-ci ...)

What this commit specifically changes is:
- Renames all core features from core-* to doom-*
- Moves core/core-* -> lisp/doom-*
- Moves core/autoloads/* -> lisp/lib/*
- Moves core/templates -> templates/

Ref: #4273
2022-07-30 22:41:13 +02:00

35 lines
816 B
EmacsLisp

;;; lisp/cli/info.el --- information about your Doom install -*- lexical-binding: t; -*-
;;; Commentary:
;;; Code:
;;
;;; Variables
;; None yet!
;;
;;; Commands
(defcli! info
((format ("--lisp" "--json") "What format to dump info into")
&context context)
"Print detailed information about your config for bug reports."
(with-temp-buffer
(pcase format
("--json"
(require 'json)
(insert (json-encode (doom-info)))
(json-pretty-print-buffer))
("--lisp"
(pp (doom-info)))
(_
(insert (doom-info-string
(if (doom-cli-context-pipe-p context :out t)
72
(doom-cli-context-width context))))))
(print! "%s" (string-trim-right (buffer-string)))))
(provide 'doom-cli-info)
;;; info.el ends here