feat(mini-files): change delete prompt default to yes and accept empty answer as confirmation

This commit is contained in:
Prad Nukala committed 2026-08-13 16:47:17 -04:00
1 parent cbd6528c83
commit fe02c6e258
1 file changed
+2 -2
+2 -2
View File
@@ -89,9 +89,9 @@ local function delete_entry()
if entry == nil then return end if entry == nil then return end
local suffix = entry.fs_type == "directory" and "/" or "" local suffix = entry.fs_type == "directory" and "/" or ""
require("snacks").input({ require("snacks").input({
prompt = ("Delete %s%s? [y/N]"):format(entry.name, suffix), prompt = ("Delete %s%s? [Y/n]"):format(entry.name, suffix),
}, function(answer) }, function(answer)
if answer == nil or not vim.tbl_contains({ "y", "yes" }, answer:lower()) then return end if answer == nil or not vim.tbl_contains({ "", "y", "yes" }, answer:lower()) then return end
vim.schedule(function() vim.schedule(function()
vim.fn.delete(entry.path, "rf") vim.fn.delete(entry.path, "rf")
mf.synchronize() mf.synchronize()