refactor(cli): precalculate cli & key in doom-cli-aliases

This commit is contained in:
Henrik Lissner 2022-09-15 19:16:34 +02:00
parent 85fac73d37
commit 7e75271933
No known key found for this signature in database
GPG key ID: B60957CA074D39A3

View file

@ -439,10 +439,11 @@ an integer.
This cannot see autoloaded CLIs. Use `doom-cli-load' or `doom-cli-load-all'
to reach them."
(cl-loop for rcli in (hash-table-values doom-cli--table)
if (equal (doom-cli-key (doom-cli-get rcli))
(doom-cli-key rcli))
collect rcli))
(cl-loop with cli = (doom-cli-get cli)
with key = (doom-cli-key cli)
for rcli in (hash-table-values doom-cli--table)
if (equal key (doom-cli-key rcli))
collect cli))
(defun doom-cli-short-docs (cli)
"Return the first line of CLI's documentation.