refactor!(cli): rename cli definers for consistency

BREAKING CHANGE: If anyone is using Doom's CLI framework and are
defining their own CLIs with any of the following macros, they'll need
to be updated to their new names:

- defautoload! -> defcli-autoload!
- defgroup! -> defcli-group!
- defstub! -> defcli-stub!
- defalias! -> defcli-alias!
- defobsolete! -> defcli-obsolete!

These were renamed to make their relationship with CLIs more obvious;
they were too ambiguous otherwise.
This commit is contained in:
Henrik Lissner 2022-09-10 23:23:29 +02:00
parent 0ce2989d86
commit bcf7a8a554
No known key found for this signature in database
GPG key ID: B60957CA074D39A3
7 changed files with 35 additions and 35 deletions

View file

@ -5,7 +5,7 @@
;; command is passed with -?, --help, or --version. They can also be aliased to
;; a sub-command to make more of its capabilities accessible to users, with:
;;
;; (defalias! (myscript (help h)) (:help))
;; (defcli-alias! (myscript (help h)) (:help))
;;
;; You can define your own command-specific help handlers, e.g.
;;

View file

@ -68,7 +68,7 @@ OPTIONS:
(write-region (buffer-string) nil codeowners-file)))))
;; TODO Finish me
(defstub! (make changelog))
(defcli-stub! (make changelog))

View file

@ -60,7 +60,7 @@ list remains lean."
(doom-autoloads-reload))
t)
(defstub! rollback) ; TODO Implement me post-3.0
(defcli-stub! rollback) ; TODO Implement me post-3.0
;;

View file

@ -18,7 +18,7 @@
;;
;;; Commands
(defalias! (:before (sync s)) (:before build))
(defcli-alias! (:before (sync s)) (:before build))
(defcli! ((sync s))
((noenvvar? ("-e") "Don't regenerate the envvar file")

View file

@ -32,7 +32,7 @@ Should be one of:
;;; Commands
;; FIXME Will be fixed in v3.1
(defstub! test
(defcli-stub! test
((backend ("--ert" "--buttercup"))
(jobs ("-j" "--jobs" int))
&rest targets)