From 8d881f44c4d5a54d7ba4f24db11be11eb4f2a675 Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Sun, 19 Jun 2022 12:38:51 +0200 Subject: [PATCH] fix(cli): various errors in 'doom help' - Wrong number of arguments: # 0 - Symbol's value as variable is void: localonly? Amend: 6c0b7e1530a6 --- core/cli/help.el | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/core/cli/help.el b/core/cli/help.el index ede79047b..adc204436 100644 --- a/core/cli/help.el +++ b/core/cli/help.el @@ -216,7 +216,7 @@ OPTIONS: .commands :prefix (doom-cli-command cli) :grouped? t :docs? t)) ("OPTIONS" . ,(doom-cli-help--render-options - (if (or (not (doom-cli-fn cli)) localonly?) + (if (or (not (doom-cli-fn cli)) noglobal?) `(,(assq 'local .options)) .options) cli))))) @@ -305,9 +305,12 @@ OPTIONS: (toplevel (assq nil commands)) (rest (nreverse (remove toplevel commands))) (drop (if prefix (length prefix) 0)) - (minwidth (apply #'max (cl-loop for cmd in (apply #'append (mapcar #'cdr commands)) - for cmd = (seq-drop cmd drop) - collect (length (doom-cli-command-string cmd))))) + (minwidth + (apply + #'max (or (cl-loop for cmd in (apply #'append (mapcar #'cdr commands)) + for cmd = (seq-drop cmd drop) + collect (length (doom-cli-command-string cmd))) + (list 15)))) (ellipsis (doom-print--style 'dark " […]")) (ellipsislen (- (length ellipsis) (if (eq doom-print-backend 'ansi) 2 4)))) (dolist (group (cons toplevel rest))