Home
Head's Up: I'm in the middle of upgrading my site. Most things are in place, but there are something missing and/or broken including image alt text. Please bear with me while I'm getting things fixed.

Telescope Extension One Shot Jobs For External Commands

This needs a write up and the code has some kruft, but it works as an example

The oneshot _ job looks like it loads data one time and then doesn't update when you type more. which makes sense.

lua
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
  },
}