From caf370cc378e7c606fd4f59c46533b0b0decbcea Mon Sep 17 00:00:00 2001 From: Nolan Prochnau Date: Mon, 5 Oct 2020 21:57:48 -0400 Subject: [PATCH] feat: Add `find` command support (#145) --- lua/telescope/builtin.lua | 6 ++++-- 1 file 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