feat(cli): fall back to :docs for docstring
Also allows for a dynamically generated docstring. Careful though, it's evaluated when `defcli!` is evaluated, not when the CLI is executed.
This commit is contained in:
parent
209092c578
commit
23b289b9a5
1 changed files with 3 additions and 1 deletions
|
@ -1413,6 +1413,8 @@ properties:
|
||||||
version specifier, indicating when the command was deprecated.
|
version specifier, indicating when the command was deprecated.
|
||||||
:disable BOOL
|
:disable BOOL
|
||||||
If non-nil, the command will not be defined.
|
If non-nil, the command will not be defined.
|
||||||
|
:docs STRING
|
||||||
|
An alternative to DOCSTRING for defining documentation for this command.
|
||||||
:group (STR...)
|
:group (STR...)
|
||||||
A breadcrumb of group names to file this command under. They will be
|
A breadcrumb of group names to file this command under. They will be
|
||||||
organized by category in the CLI documentation (available through SCRIPT
|
organized by category in the CLI documentation (available through SCRIPT
|
||||||
|
@ -1494,7 +1496,7 @@ ignored.
|
||||||
(doom-cli-create
|
(doom-cli-create
|
||||||
:command target
|
:command target
|
||||||
:type type
|
:type type
|
||||||
:docs ',(doom-cli--parse-docs docstring)
|
:docs (doom-cli--parse-docs (or ',docstring docs))
|
||||||
:arguments ',arguments
|
:arguments ',arguments
|
||||||
:options ',(nreverse options)
|
:options ',(nreverse options)
|
||||||
:autoload autoload
|
:autoload autoload
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue