I would like to use fzf-lua to prompt for a specific directory listing and then prompt for files in the selected directory. I have looked at the fzf-lua github repo and the advanced options are really over my head at this point. I believe I have to use ‘actions’ to accomplish this, but I don’t know where and how. With the example below the idea is the function prompts with a listing of all the directories under ~/projects. Then when a directory is selected, the action should spawn an new fzf-lua command to list the files in that directory. When a file is selected it should be opened. Thanks for any help!
function Projects()
coroutine.wrap(function()
local actions = {
["default"] = {
require("fzf-lua").files { cwd = project },
},
}
local project = require("fzf-lua").fzf_exec("ls", { prompt = "Projects> ", cwd = "~/projects" })
end)()
end