Skip to content

Commit

Permalink
remove selection
Browse files Browse the repository at this point in the history
  • Loading branch information
mosheavni committed Oct 22, 2024
1 parent 667a6b9 commit a5239c7
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion ftplugin/k8s_pods.lua
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ local function set_keymaps(bufnr)
end
end

for _, selection in ipairs(selections) do
for i, selection in ipairs(selections) do
local name = selection.name
local ns = selection.namespace

Expand All @@ -72,6 +72,8 @@ local function set_keymaps(bufnr)
end
vim.notify("Deleting pod " .. name)
commands.shell_command_async("kubectl", { "delete", "pod", name, "-n", ns })
-- remove from selections
table.remove(selections, i)
end
pod_view.Draw()
end,
Expand Down

0 comments on commit a5239c7

Please sign in to comment.