From: Eshel Yaron Date: Tue, 14 Jan 2025 17:44:31 +0000 (+0100) Subject: Fix 'kubed-list-delete-marked' in non-default context X-Git-Tag: v0.4.3~2 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=e7f167d53368b5346b66a8da2869f36c7efd7e14;p=kubed.git 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 --- 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")