fix(cli): &rest not consuming rest of arguments
An edge case that occurs when no options are supplied to make arguments non-null.
This commit is contained in:
parent
2aca862187
commit
e651547abb
1 changed files with 2 additions and 1 deletions
|
@ -764,6 +764,7 @@ executable context."
|
||||||
|
|
||||||
((when-let*
|
((when-let*
|
||||||
(((null arguments))
|
(((null arguments))
|
||||||
|
((not rest?))
|
||||||
(command (append (doom-cli--command context) (list arg)))
|
(command (append (doom-cli--command context) (list arg)))
|
||||||
(cli (doom-cli-get command t))
|
(cli (doom-cli-get command t))
|
||||||
(rcli (doom-cli-get command))
|
(rcli (doom-cli-get command))
|
||||||
|
@ -784,7 +785,7 @@ executable context."
|
||||||
(setf (map-elt (doom-cli-context-options context) switch)
|
(setf (map-elt (doom-cli-context-options context) switch)
|
||||||
nil)))))
|
nil)))))
|
||||||
(when (and (doom-cli-fn rcli)
|
(when (and (doom-cli-fn rcli)
|
||||||
(alist-get '&rest (doom-cli-arguments cli)))
|
(alist-get '&rest (doom-cli-arguments rcli)))
|
||||||
(setq rest? t))
|
(setq rest? t))
|
||||||
t))
|
t))
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue