fix: exclude .git for default fd command (#221)

* Update help file for `fd`

* Update finder.lua

* Also change for `fdfind`

* Update doc/telescope-frecency.txt

Co-authored-by: JINNOUCHI Yasushi <delphinus35+github@me.com>

* Update lua/frecency/finder.lua

Co-authored-by: JINNOUCHI Yasushi <delphinus35+github@me.com>

---------

Co-authored-by: JINNOUCHI Yasushi <delphinus35+github@me.com>
This commit is contained in:
Matthew Grossman 2024-07-07 21:48:43 -07:00 committed by GitHub
parent a03eb9b78a
commit 631bf1af1d
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 3 additions and 3 deletions

View File

@ -584,8 +584,8 @@ Type: `"LUA"|string[]|nil`
With the default value: `nil`, it uses these ways below to make entries for
workspace files. It tries in order until it works successfully.
1. `fdfind -Htf`
2. `fd -Htf`
1. `fdfind -Htf -E .git`
2. `fd -Htf -E .git`
3. `rg -.g '!.git' --files`
4. Native Lua code (old way)

View File

@ -83,7 +83,7 @@ function Finder:start(epoch)
if config.workspace_scan_cmd ~= "LUA" and self.need_scan_dir then
---@type string[][]
local cmds = config.workspace_scan_cmd and { config.workspace_scan_cmd }
or { { "fdfind", "-Htf" }, { "fd", "-Htf" }, { "rg", "-.g", "!.git", "--files" } }
or { { "fdfind", "-Htf", "-E", ".git" }, { "fd", "-Htf", "-E", ".git" }, { "rg", "-.g", "!.git", "--files" } }
for _, c in ipairs(cmds) do
ok = self:scan_dir_cmd(c)
if ok then