refactor(cli): doom version: add -v/--verbose option

And make its default output only print `doom-version` to stdout.
This commit is contained in:
Henrik Lissner
2025-06-23 21:44:36 +02:00
parent 7f6a2d284e
commit c46583e3ec

View File

@ -2490,11 +2490,16 @@ OPTIONS:
" or ")))))))))
(defcli! (:root :version)
((simple? ("--simple"))
&context context)
"Show installed versions of Doom, Doom modules, and Emacs."
(doom/version)
(unless simple?
((verbose? ("-v" "--verbose"))
&context _)
"Show installed versions of Doom core.
OPTIONS:
-v, --verbose
Also show version (and git info) for GNU Emacs and installed module sources."
(if (not verbose?)
(print! "%s" doom-version)
(doom/version)
(terpri)
(with-temp-buffer
(insert-file-contents (doom-path doom-emacs-dir "LICENSE"))