feat(picker): mapped <c-g> to print_cwd in list. See #2244

This commit is contained in:
Folke Lemaitre 2025-10-21 07:25:35 +02:00
parent 14dd362d5d
commit faa6abacb4
No known key found for this signature in database
GPG key ID: 9B52594D560070AB
2 changed files with 5 additions and 0 deletions

View file

@ -153,6 +153,10 @@ function M.close(picker)
end) end)
end end
function M.print_cwd(picker)
print(picker:cwd())
end
function M.cancel(picker) function M.cancel(picker)
picker:norm(function() picker:norm(function()
local main = require("snacks.picker.core.main").new({ float = false, file = false }) local main = require("snacks.picker.core.main").new({ float = false, file = false })

View file

@ -296,6 +296,7 @@ local defaults = {
["<c-n>"] = "list_down", ["<c-n>"] = "list_down",
["<c-p>"] = "list_up", ["<c-p>"] = "list_up",
["<c-q>"] = "qflist", ["<c-q>"] = "qflist",
["<c-g>"] = "print_cwd",
["<c-s>"] = "edit_split", ["<c-s>"] = "edit_split",
["<c-t>"] = "tab", ["<c-t>"] = "tab",
["<c-u>"] = "list_scroll_up", ["<c-u>"] = "list_scroll_up",