The words Under construction in black text on a yellow background with diagonal black stipes surrounding it
I'm in the process of moving my site. It's still a work in progress. Please excuse the mess and broken links.

Telescope Extension One Shot Jobs For External Commands

TODO: Pull subtitle into page object

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.

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

Debugging Stuff

I'm moving stuff around right now. All this below is helping me figure out where to put stuff

        -- title

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. 


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


-- blurb

-- categories
-- Neovim 
-- Lua 

-- metadata
-- date: 2023-03-20 17:31:47
-- id: 2nio0doa
-- site: aws
-- type: post
-- status: published