fix advanced search auto globbing feature

This commit is contained in:
2025-11-04 10:02:32 +02:00
parent f38e7720e1
commit 7e7a4a5543

View File

@@ -27,7 +27,13 @@ local advanced_grep = function(opts)
if pieces[2] then
table.insert(args, "-g")
table.insert(args, pieces[2])
local input_glob = pieces[2]
local glob = input_glob
if not input_glob:find("*", 1, true) then
glob = '**/*' .. input_glob .. '*/**'
end
table.insert(args, glob)
end
return vim.iter({ args, { "--color=never", "--no-heading", "--with-filename", "--line-number", "--column", "--smart-case" } })