]> git.eshelyaron.com Git - emacs.git/commitdiff
(kubed-kubectl-command): Fix handling of transient scope
authorEshel Yaron <me@eshelyaron.com>
Sat, 27 Jul 2024 16:20:22 +0000 (18:20 +0200)
committerEshel Yaron <me@eshelyaron.com>
Sat, 27 Jul 2024 16:20:22 +0000 (18:20 +0200)
lisp/net/kubed.el

index a60d7fd4e4b5b16c2590b1e6dec192148a0c199a..70172d730a971ff0de68393d584344404b3a89fa 100644 (file)
@@ -1834,12 +1834,10 @@ Interactively, prompt for COMMAND with completion for `kubectl' arguments."
           "Command: "
           (concat
            kubed-kubectl-program " "
-           (when-let ((args (kubed-transient-args)))
-             (concat (string-join
-                      (append (and (fboundp 'transient-scope) (transient-scope))
-                              args)
-                      " ")
-                     " ")))
+           (let ((args (kubed-transient-args))
+                 (scope (and (fboundp 'transient-scope) (transient-scope))))
+             (when (or args scope)
+               (concat (string-join (append scope args) " ") " "))))
           'kubed-kubectl-command-history)))
   (shell-command command))