From e7f167d53368b5346b66a8da2869f36c7efd7e14 Mon Sep 17 00:00:00 2001 From: Eshel Yaron Date: Tue, 14 Jan 2025 18:44:31 +0100 Subject: [PATCH] Fix 'kubed-list-delete-marked' in non-default context * kubed.el (kubed-list-delete-marked): Respect 'kubed-list-context' and 'kubed-list-namespace'. Fixes https://github.com/eshelyaron/kubed/issues/9 --- kubed.el | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/kubed.el b/kubed.el index 4352c92..7a0aa8e 100644 --- a/kubed.el +++ b/kubed.el @@ -767,9 +767,14 @@ regardless of QUIET." (make-process :name "*kubed-list-delete-marked*" :stderr errb - :command (append - (list kubed-kubectl-program "delete" kubed-list-type) - delete-list) + :command (cons kubed-kubectl-program + (append + (when kubed-list-context + (list "--context" kubed-list-context)) + (when kubed-list-namespace + (list "--namespace" kubed-list-namespace)) + (list "delete" kubed-list-type) + delete-list)) :sentinel (lambda (_proc status) (cond ((string= status "finished\n") -- 2.39.5