diff options
| author | Jeremy Neal <hello@radglob.com> | 2022-06-06 08:06:34 -0400 |
|---|---|---|
| committer | Simon Hauser <simon.hauser@helsinki-systems.de> | 2022-06-30 14:01:50 +0200 |
| commit | 8488cd5ac7a5c5b99773b5b8de5723ce4cedc796 (patch) | |
| tree | 1c8b569f65b9a5feecf9eb32395dafd4382e7c9d /lua | |
| parent | a6c9ae088e354c529db8bedf04166e1ab8a6f1b2 (diff) | |
feat: no-ignore-parent shorthand option for find_files. (#1963)
Diffstat (limited to 'lua')
| -rw-r--r-- | lua/telescope/builtin/files.lua | 10 | ||||
| -rw-r--r-- | lua/telescope/builtin/init.lua | 1 |
2 files changed, 11 insertions, 0 deletions
diff --git a/lua/telescope/builtin/files.lua b/lua/telescope/builtin/files.lua index 3ebcdf4..f078f45 100644 --- a/lua/telescope/builtin/files.lua +++ b/lua/telescope/builtin/files.lua @@ -183,6 +183,7 @@ files.find_files = function(opts) local command = find_command[1] local hidden = opts.hidden local no_ignore = opts.no_ignore + local no_ignore_parent = opts.no_ignore_parent local follow = opts.follow local search_dirs = opts.search_dirs @@ -199,6 +200,9 @@ files.find_files = function(opts) if no_ignore then table.insert(find_command, "--no-ignore") end + if no_ignore_parent then + table.insert(find_command, "--no-ignore-parent") + end if follow then table.insert(find_command, "-L") end @@ -218,6 +222,9 @@ files.find_files = function(opts) if no_ignore ~= nil then log.warn "The `no_ignore` key is not available for the `find` command in `find_files`." end + if no_ignore_parent ~= nil then + log.warn "The `no_ignore_parent` key is not available for the `find` command in `find_files`." + end if follow then table.insert(find_command, 2, "-L") end @@ -234,6 +241,9 @@ files.find_files = function(opts) if no_ignore ~= nil then log.warn "The `no_ignore` key is not available for the Windows `where` command in `find_files`." end + if no_ignore_parent ~= nil then + log.warn "The `no_ignore_parent` key is not available for the Windows `where` command in `find_files`." + end if follow ~= nil then log.warn "The `follow` key is not available for the Windows `where` command in `find_files`." end diff --git a/lua/telescope/builtin/init.lua b/lua/telescope/builtin/init.lua index e9b695b..9fa6826 100644 --- a/lua/telescope/builtin/init.lua +++ b/lua/telescope/builtin/init.lua @@ -81,6 +81,7 @@ builtin.grep_string = require_on_exported_call("telescope.builtin.files").grep_s ---@field follow boolean: if true, follows symlinks (i.e. uses `-L` flag for the `find` command) ---@field hidden boolean: determines whether to show hidden files or not (default: false) ---@field no_ignore boolean: show files ignored by .gitignore, .ignore, etc. (default: false) +---@field no_ignore_parent boolean: show files ignored by .gitignore, .ignore, etc. in parent dirs. (default: false) ---@field search_dirs table: directory/directories to search in builtin.find_files = require_on_exported_call("telescope.builtin.files").find_files |
