diff --git a/lua/crentist/telescope/advanced_grep.lua b/lua/crentist/telescope/advanced_grep.lua index 48e1e5c..dd9f06b 100644 --- a/lua/crentist/telescope/advanced_grep.lua +++ b/lua/crentist/telescope/advanced_grep.lua @@ -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" } })