summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNolan Prochnau <parvus.mortalis@gmail.com>2020-10-05 21:57:48 -0400
committerGitHub <noreply@github.com>2020-10-05 21:57:48 -0400
commitcaf370cc378e7c606fd4f59c46533b0b0decbcea (patch)
tree05736fbed8caef3694d96fd3c6ad7e1a9474ebca
parentb4a6355f508068a75a849b9e4356ffa1d0e9b7db (diff)
feat: Add `find` command support (#145)
-rw-r--r--lua/telescope/builtin.lua6
1 files changed, 4 insertions, 2 deletions
diff --git a/lua/telescope/builtin.lua b/lua/telescope/builtin.lua
index 6d74e28..fc63f1f 100644
--- a/lua/telescope/builtin.lua
+++ b/lua/telescope/builtin.lua
@@ -524,7 +524,7 @@ end
-- TODO: Maybe just change this to `find`.
--- Support `find` and maybe let peopel do other stuff with it as well.
+-- Support `find` and maybe let people do other stuff with it as well.
builtin.find_files = function(opts)
opts = opts or {}
@@ -537,11 +537,13 @@ builtin.find_files = function(opts)
find_command = { 'fdfind', '--type', 'f' }
elseif 1 == vim.fn.executable("rg") then
find_command = { 'rg', '--files' }
+ elseif 1 == vim.fn.executable("find") then
+ find_command = { 'find', '-type', 'f' }
end
end
if not find_command then
- print("You need to install either fd or rg. You can also submit a PR to add support for another file finder :)")
+ print("You need to install either find, fd, or rg. You can also submit a PR to add support for another file finder :)")
return
end