Telescope Extension One Shot Jobs For External Commands
Note
This needs a write up and the code has some kruft, but it works as an example
Note
The oneshot_job looks like it loads data one time and then doesn't update when you type more. which makes sense.
local pickers = require "telescope.pickers"
local finders = require "telescope.finders"
local run_search = function(opts)
opts = opts or {}
if next(opts) == nil then
-- TODO: Figure out how to do a "not" check
else
require('notify')(opts)
end
pickers.new(opts, {
prompt_title = "grimoire",
finder = finders.new_oneshot_job({ 'echo', 'here' })
}):find()
end
return require("telescope").register_extension {
exports = {
grimoire = run_search
},
}
~ fin ~