fix(cli): return *all* aliases from doom-cli-aliases

Now it walks the command tree breadth-first to collect *all* aliases
that lead to the given command.
This commit is contained in:
Henrik Lissner 2022-06-22 19:38:16 +02:00
parent 4dcfc37199
commit a65e97bf2c
No known key found for this signature in database
GPG key ID: B60957CA074D39A3

View file

@ -334,7 +334,8 @@ 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-alias rcli) (doom-cli-key cli))
if (equal (doom-cli-key (doom-cli-get rcli))
(doom-cli-key rcli))
collect rcli))
(defun doom-cli-short-docs (cli)