Skip to content

Commit f50162a

Browse files
committed
feat(builtin.files): Add hidden file filter toggle to grep_string
1 parent b4da76b commit f50162a

File tree

2 files changed

+5
-0
lines changed

2 files changed

+5
-0
lines changed

lua/telescope/builtin/__files.lua

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -224,6 +224,10 @@ files.grep_string = function(opts)
224224
additional_args[#additional_args + 1] = "--encoding=" .. opts.file_encoding
225225
end
226226

227+
if opts.hidden then
228+
additional_args[#additional_args + 1] = "--hidden"
229+
end
230+
227231
local args
228232
if visual == true then
229233
args = flatten {

lua/telescope/builtin/init.lua

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,7 @@ builtin.live_grep = require_on_exported_call("telescope.builtin.__files").live_g
7070
---@field disable_coordinates boolean: don't show the line and row numbers (default: false)
7171
---@field only_sort_text boolean: only sort the text, not the file, line or row (default: false)
7272
---@field file_encoding string: file encoding for the entry & previewer
73+
---@field hidden boolean: if true, hidden directories and files will be searched (default: false)
7374
builtin.grep_string = require_on_exported_call("telescope.builtin.__files").grep_string
7475

7576
--- Search for files (respecting .gitignore)

0 commit comments

Comments
 (0)