--- Creates a lookup table for devicons data, keyed by the 'name' field.
-- Takes the result structure obtained from capturing `get_icons()` output (e.g., from msg_show).
-- @param result_structure table The Lua table representation of the JSON output.
-- @return table|nil A lookup table { [name] = icon_data, ... } or nil on error.
local function create_icons_lookup(result_structure)
  -- Safely access the content string containing the Lua table data
  local content_string = result_structure
    and result_structure.attachments
    and result_structure.attachments[1]
    and result_structure.attachments[1].content

  if type(content_string) ~= "string" then
    -- Handle cases where the expected structure is missing or content isn't a string
    vim.api.nvim_echo({ "Error: Expected 'content' string not found in input structure.", "Error" }, false, {})
    return nil
  end

  -- Evaluate the content string as Lua code using vim.fn.eval
  -- This turns the string representation "{ {}, [".DS_Store"] = {}, ... }"
  -- into an actual Lua table.
  local icons_table
  local success, err = pcall(function()
    icons_table = vim.fn.eval(content_string)
  end)

  if not success then
    vim.api.nvim_echo({ "Error evaluating icons string: " .. tostring(err), "Error" }, false, {})
    return nil
  end

  -- Ensure the evaluation result is a table
  if type(icons_table) ~= "table" then
    vim.api.nvim_echo({ "Error: Evaluation did not result in a Lua table.", "Error" }, false, {})
    return nil
  end

  -- Create the lookup table keyed by 'name'
  local lookup_table = {}

  -- Iterate through the table obtained from the evaluation
  -- The original table might have mixed string and numerical keys.
  -- We iterate over all values and add them to the new table if they have a 'name' key.
  for _, icon_data in pairs(icons_table) do
    -- Check if the value is a table and contains the 'name' field
    if type(icon_data) == "table" and type(icon_data.name) == "string" then
      lookup_table[icon_data.name] = icon_data
      -- Handle the default icon which might be the first entry without a specific name key
      -- but still has a 'name' field inside its table value.
    elseif type(icon_data) == "table" and icon_data.name == "Default" then
      lookup_table["Default"] = icon_data
    end
  end

  return lookup_table
end

-- --- Example Usage ---
-- -- Assuming you have the entire output structure in a variable named `captured_output`
-- -- Replace this with your actual captured output variable
-- local captured_output = {
--   attachments = {
--     {
--       name = "...", -- The name field doesn't matter for the function logic
--       content = "{\n    color = \"#c8d3f5\",\n    cterm_color = \"66\",\n    icon = \"󰈔\",\n    name = \"Default\"\n  },\n  [\".DS_Store\"] = {\n    color = \"#ff757f\",\n    cterm_color = \"66\",\n    icon = \"󰒓\",\n    name = \".DS_Store\"\n  },\n  [\".bash_profile\"] = {\n    color = \"#c3e88d\",\n    cterm_color = \"66\",\n    icon = \"󰒓\",\n    name = \".bash_profile\"\n  },\n  [\".bashrc\"] = {\n    color = \"#c3e88d\",\n    cterm_color = \"66\",\n    icon = \"󰒓\",\n    name = \".bashrc\"\n  },\n  [\".eslintrc.js\"] = {\n    color = \"#ffc777\",\n    cterm_color = \"66\",\n    icon = \"󰱺\",\n    name = \".eslintrc.js\"\n  },\n  [\".git\"] = {\n    color = \"#ff966c\",\n    cterm_color = \"66\",\n    icon = \"󰊢\",\n    name = \".git\"\n  },\n  [\".gitkeep\"] = {\n    color = \"#ff757f\",\n    cterm_color = \"66\",\n    icon = \"󰊢\",\n    name = \".gitkeep\"\n  },\n  [\".gitlab-ci.yml\"] = {\n    color = \"#ff966c\",\n    cterm_color = \"66\",\n    icon = \"󰮠\",\n    name = \".gitlab-ci.yml\"\n  },\n  [\".gitolite.rc\"] = {\n    color = \"#0db9d7\",\n    cterm_color = \"66\",\n    icon = \"\",\n    name = \".gitolite.rc\"\n  },\n  [\".go-version\"] = {\n    color = \"#82aaff\",\n    cterm_color = \"66\",\n    icon = \"\",\n    name = \".go-version\"\n  },\n  [\".indent.pro\"] = {\n    color = \"#c3e88d\",\n    cterm_color = \"66\",\n    icon = \"󰉶\",\n    name = \".indent.pro\"\n  },\n  [\".keep\"] = {\n    color = \"#c8d3f5\",\n    cterm_color = \"66\",\n    icon = \"󰊢\",\n    name = \".keep\"\n  },\n  [\".mailmap\"] = {\n    color = \"#4fd6be\",\n    cterm_color = \"66\",\n    icon = \"󰊢\",\n    name = \".mailmap\"\n  },\n  [\".node-version\"] = {\n    color = \"#c3e88d\",\n    cterm_color = \"66\",\n    icon = \"\",\n    name = \".node-version\"\n  },\n  [\".npmignore\"] = {\n    color = \"#c8d3f5\",\n    cterm_color = \"66\",\n    icon = \"󰒓\",\n    name = \".npmignore\"\n  },\n  [\".nvmrc\"] = {\n    color = \"#c3e88d\",\n    cterm_color = \"66\",\n    icon = \"󰒓\",\n    name = \".nvmrc\"\n  },\n  [\".oelint.cfg\"] = {\n    color = \"#0db9d7\",\n    cterm_color = \"66\",\n    icon = \"󰯂\",\n    name = \".oelint.cfg\"\n  },\n  [\".prettierignore\"] = {\n    color = \"#ff966c\",\n    cterm_color = \"66\",\n    icon = \"\",\n    name = \".prettierignore\"\n  },\n  [\".prettierrc\"] = {\n    color = \"#fca7ea\",\n    cterm_color = \"66\",\n    icon = \"\",\n    name = \".prettierrc\"\n  },\n  [\".wakatime.cfg\"] = {\n    color = \"#0db9d7\",\n    cterm_color = \"66\",\n    icon = \"󰯂\",\n    name = \".wakatime.cfg\"\n  },\n  [\".xinitrc\"] = {\n    color = \"#82aaff\",\n    cterm_color = \"66\",\n    icon = \"󰒓\",\n    name = \".xinitrc\"\n  },\n  [\".yarnrc.yml\"] = {\n    color = \"#82aaff\",\ncterm_color = \"66\",\n    icon = \"\",\n    name = \".yarnrc.yml\"\n  },\n  [\".zshrc\"] = {\n    color = \"#c3e88d\",\n    cterm_color = \"66\",\n    icon = \"󰒓\",\n    name = \".zshrc\"\n  },\n  [\"3gp\"] = {\n    color = \"#ffc777\",\n    cterm_color = \"66\",\n    icon = \"󰈫\",\n    name = \"3gp\"\n  },\n  [\"7z\"] = {\n    color = \"#82aaff\",\n    cterm_color = \"66\",\n    icon = \"󰗄\",\n    name = \"7z\"\n  },\n  CHANGELOG = {\n    color = \"#82aaff\",\n    cterm_color = \"66\",\n    icon = \"󰉻\",\n    name = \"CHANGELOG\"\n  },\n  [\"CHANGELOG.md\"] = {\n    color = \"#82aaff\",\n    cterm_color = \"66\",\n    icon = \"󰉻\",\n    name = \"CHANGELOG.md\"\n  },\n  [\"CMakeCache.txt\"] = {\n    color = \"#ff757f\",\n    cterm_color = \"66\",\n    icon = \"󱁤\",\n    name = \"CMakeCache.txt\"\n  },\n  [\"CMakeLists.txt\"] = {\n    color = \"#ff966c\",\n    cterm_color = \"66\",\n    icon = \"󱁤\",\n    name = \"CMakeLists.txt\"\n  },\n  CODEOWNERS = {\n    color = \"#fca7ea\",\n    cterm_color = \"66\",\n    icon = \"󰜻\",\n    name = \"CODEOWNERS\"\n  },\n  CODE_OF_CONDUCT = {\n    color = \"#ff757f\",\n    cterm_color = \"66\",\n    icon = \"󱃱\",\n    name = \"CODE_OF_CONDUCT\"\n  },\n  [\"CODE_OF_CONDUCT.md\"] = {\n    color = \"#ff757f\",\n    cterm_color = \"66\",\n    icon = \"󱃱\",\n    name = \"CODE_OF_CONDUCT.md\"\n  },\n  CONTRIBUTING = {\n    color = \"#0db9d7\",\n    cterm_color = \"66\",\n    icon = \"󰺾\",\n    name = \"CONTRIBUTING\"\n  },\n  [\"CONTRIBUTING.md\"] = {\n    color = \"#0db9d7\",\n    cterm_color = \"66\",\n    icon = \"󰺾\",\n    name = \"CONTRIBUTING.md\"\n  },\n  [\"FUNDING.yml\"] = {\n    color = \"#c3e88d\",\n    cterm_color = \"66\",\n    icon = \"󰇁\",\n    name = \"FUNDING.yml\"\n  },\n  [\"GNUmakefile.am\"] = {\n    color = \"#fca7ea\",\n    cterm_color = \"66\",\n    icon = \"󱁤\",\n    name = \"GNUmakefile.am\"\n  },\n  LICENSE = {\n    color = \"#4fd6be\",\n    cterm_color = \"66\",\n    icon = \"\",\n    name = \"LICENSE\"\n  },\n  [\"LICENSE.md\"] = {\n    color = \"#4fd6be\",\n    cterm_color = \"66\",\n    icon = \"\",\n    name = \"LICENSE.md\"\n  },\n  [\"LICENSE.txt\"] = {\n    color = \"#4fd6be\",\n    cterm_color = \"66\",\n    icon = \"\",\n    name = \"LICENSE.txt\"\n  },\n  [\"Makefile.am\"] = {\n    color = \"#fca7ea\",\n    cterm_color = \"66\",\n    icon = \"󱁤\",\n    name = \"Makefile.am\"\n  },\n  NEWS = {\n    color = \"#82aaff\",\n    cterm_color = \"66\",\n    icon = \"󰎕\",\n    name = \"NEWS\"\n  },\n  [\"NEWS.md\"] = {\n    color = \"#82aaff\",\n    cterm_color = \"66\",\n    icon = \"󰎕\",\n    name = \"NEWS.md\"\n  },\n  PKGBUILD = {\n    color = \"#fca7ea\",\n    cterm_color = \"66\",\n    icon = \"󱁤\",\n    name = \"PKGBUILD\"\n  },\n  README = {\n    color = \"#ffc777\",\n    cterm_color = \"66\",\n    icon = \"\",\n    name = \"README\"\n  },\n  [\"README.md\"] = {\n    color = \"#ffc777\",\n    cterm_color = \"66\",\n    icon = \"\",\n    name = \"README.md\"\n  },\n  [\"README.txt\"] = {\n    color = \"#ffc777\",\n    cterm_color = \"66\",\n    icon = \"\",\n    name = \"README.txt\"\n  },\n  TODO = {\n    color = \"#fca7ea\",\n    cterm_color = \"66\",\n    icon = \"󰝖\",\n    name = \"TODO\"\n  },\n  [\"TODO.md\"] = {\n    color = \"#fca7ea\",\n    cterm_color = \"66\",\n    icon = \"󰝖\",\n    name = \"TODO.md\"\n  },\n  aac = {\n    color = \"#ffc777\",\n    cterm_color = \"66\",\n    icon = \"󰈣\",\n    name = \"aac\"\n  },\n  aif = {\n    color = \"#4fd6be\",\n    cterm_color = \"66\",\n    icon = \"󰈣\",\n    name = \"aif\"\n  },\n  android = {\n    color = \"#c3e88d\",\n    cterm_color = \"66\",\n    icon = \"󰀲\",\n    name = \"android\"\n  },\n  arch = {\n    color = \"#0db9d7\",\n    cterm_color = \"66\",\n    icon = \"󰣇\",\n    name = \"arch\"\n  },\n  [\"auto.master\"] = {\n    color = \"#c8d3f5\",\n    cterm_color = \"66\",\n    icon = \"󰒓\",\n    name = \"auto.master\"\n  },\n  avi = {\n    color = \"#c8d3f5\",\n    cterm_color = \"66\",\n    icon = \"󰈫\",\n    name = \"avi\"\n  },\n  bmp = {\n    color = \"#c3e88d\",\n    cterm_color = \"66\",\n    icon = \"󰈟\",\n    name = \"bmp\"\n  },\n  [\"build.xml\"] = {\n    color = \"#ff757f\",\n    cterm_color = \"66\",\n    icon = \"󰫮\",\n    name = \"build.xml\"\n  },\n  bz = {\n    color = \"#ff966c\",\n    cterm_color = \"66\",\n    icon = \"󰗄\",\n    name = \"bz\"\n  },\n  bz2 = {\n    color = \"#ff966c\",\n    cterm_color = \"66\",\n    icon = \"󰗄\",\n    name = \"bz2\"\n  },\n  bz3 = {\n    color = \"#ff966c\",\n    cterm_color = \"66\",\n    icon = \"󰗄\",\n    name = \"bz3\"\n  },\n  cast = {\n    color = \"#ff757f\",\n    cterm_color = \"66\",\n    icon = \"󰈫\",\n    name = \"cast\"\n  },\n  centos = {\n    color = \"#ff757f\",\n    cterm_color = \"66\",\n    icon = \"󱄚\",\n    name = \"centos\"\n  },\n  [\"cm3.cfg\"] = {\n    color = \"#c3e88d\",\n    cterm_color = \"66\",\n    icon = \"󰫺\",\n    name = \"cm3.cfg\"\n  },\n  [\"code-snippets\"] = {\n    color = \"#ffc777\",\n    cterm_color = \"66\",\n    icon = \"󰘦\",\n    name = \"code-snippets\"\n  },\n  [\"config.ld\"] = {\n    color = \"#0db9d7\",\n    cterm_color = \"66\",\n    icon = \"󰢱\",\n    name = \"config.ld\"\n  },\n  [\"constraints.txt\"] = {\n    color = \"#fca7ea\",\n    cterm_color = \"66\",\n    icon = \"󱘎\",\n    name = \"constraints.txt\"\n  },\n  debian = {\n    color = \"#ff757f\",\n    cterm_color = \"66\",\n    icon = \"󰣚\",\n    name = \"debian\"\n  },\n  [\"devcontainer.json\"] = {\n    color = \"#0db9d7\",\n    cterm_color = \"66\",\n    icon = \"\",\n    name = \"devcontainer.json\"\n  },\n  doc = {\n    color = \"#0db9d7\",\n    cterm_color = \"66\",\n    icon = \"󱎒\",\n    name = \"doc\"\n  },\n  docm = {\n    color = \"#0db9d7\",\n    cterm_color = \"66\",\n    icon = \"󱎒\",\n    name = \"docm\"\n  },\n  docx = {\n    color = \"#0db9d7\",\n    cterm_color = \"66\",\n    icon = \"󱎒\",\n    name = \"docx\"\n  },\n  dot = {\n    color = \"#0db9d7\",\n    cterm_color = \"66\",\n    icon = \"󱎒\",\n    name = \"dot\"\n  },\n  dotx = {\n    color = \"#0db9d7\",\n    cterm_color = \"66\",\n    icon = \"󱎒\",\n    name = \"dotx\"\n  },\n  eps = {\n    color = \"#ff757f\",\n    cterm_color = \"66\",\n    icon = \"\",\n    name = \"eps\"\n  },\n  [\"eslint.config.js\"] = {\n    color = \"#ffc777\",\n    cterm_color = \"66\",\n    icon = \"󰱺\",\n    name = \"eslint.config.js\"\n  },\n  [\"example.gitolite.rc\"] = {\n    color = \"#0db9d7\",\n    cterm_color = \"66\",\n    icon = \"\",\n    name = \"example.gitolite.rc\"\n  },\n  exe = {\n    color = \"#ff757f\",\n    cterm_color = \"66\",\n    icon = \"󰖳\",\n    name = \"exe\"\n  },\n  exs = {\n    color = \"#fca7ea\",\n    cterm_color = \"66\",\n    icon = \"\",\n    name = \"exs\"\n  },\n  fedora = {\n    color = \"#82aaff\",\n    cterm_color = \"66\",\n    icon = \"󰣛\",\n    name = \"fedora\"\n  },\n  flac = {\n    color = \"#ff966c\",\n    cterm_color = \"66\",\n    icon = \"󰈣\",\n    name = \"flac\"\n  },\n  freebsd = {\n    color = \"#ff757f\",\n    cterm_color = \"66\",\n    icon = \"󰣠\",\n    name = \"freebsd\"\n  },\n  gentoo = {\n    color = \"#fca7ea\",\n    cterm_color = \"66\",\n    icon = \"󰣨\",\n    name = \"gentoo\"\n  },\n  gif = {\n    color = \"#0db9d7\",\n    cterm_color = \"66\",\n    icon = \"󰵸\",\n    name = \"gif\"\n  },\n  [\"gitolite.rc\"] = {\n    color = \"#0db9d7\",\n    cterm_color = \"66\",\n    icon = \"\",\n    name = \"gitolite.rc\"\n  },\n  [\"go.sum\"] = {\n    color = \"#4fd6be\",\n    cterm_color = \"66\",\n    icon = \"󰟓\",\n    name = \"go.sum\"\n  },\n  [\"go.work.sum\"] = {\n    color = \"#4fd6be\",\n    cterm_color = \"66\",\n    icon = \"󰟓\",\n    name = \"go.work.sum\"\n  },\n  gz = {\n    color = \"#c8d3f5\",\n    cterm_color = \"66\",\n    icon = \"󰗄\",\n    name = \"gz\"\n  },\n  h = {\n    color = \"#fca7ea\",\ncterm_color = \"66\",\n    icon = \"󰫵\",\n    name = \"h\"\n  },\n  [\"indent.pro\"] = {\n    color = \"#c3e88d\",\n    cterm_color = \"66\",\n    icon = \"󰉶\",\n    name = \"indent.pro\"\n  },\n  [\"init.lua\"] = {\n    color = \"#c3e88d\",\n    cterm_color = \"66\",\n    icon = \"\",\n    name = \"init.lua\"\n  },\n  ios = {\n    color = \"#ffc777\",\n    cterm_color = \"66\",\n    icon = \"󰀷\",\n    name = \"ios\"\n  },\n  [\"ipf.rules\"] = {\n    color = \"#0db9d7\",\n    cterm_color = \"66\",\n    icon = \"󰒓\",\n    name = \"ipf.rules\"\n  },\n  ipynb = {\n    color = \"#ff966c\",\n    cterm_color = \"66\",\n    icon = \"󰠮\",\n    name = \"ipynb\"\n  },\n  jpeg = {\n    color = \"#ff966c\",\n    cterm_color = \"66\",\n    icon = \"󰈥\",\n    name = \"jpeg\"\n  },\n  jpg = {\n    color = \"#ff966c\",\n    cterm_color = \"66\",\n    icon = \"󰈥\",\n    name = \"jpg\"\n  },\n  linux = {\n    color = \"#4fd6be\",\n    cterm_color = \"66\",\n    icon = \"󰌽\",\n    name = \"linux\"\n  },\n  [\"lltxxxxx.txt\"] = {\n    color = \"#ff757f\",\n    cterm_color = \"66\",\n    icon = \"󰫴\",\n    name = \"lltxxxxx.txt\"\n  },\n  [\"lynx.cfg\"] = {\n    color = \"#ff757f\",\n    cterm_color = \"66\",\n    icon = \"󰒓\",\n    name = \"lynx.cfg\"\n  },\n  m4a = {\n    color = \"#fca7ea\",\n    cterm_color = \"66\",\n    icon = \"󰈣\",\n    name = \"m4a\"\n  },\n  m4v = {\n    color = \"#ff966c\",\n    cterm_color = \"66\",\n    icon = \"󰈫\",\n    name = \"m4v\"\n  },\n  macos = {\n    color = \"#c8d3f5\",\n    cterm_color = \"66\",\n    icon = \"󰀵\",\n    name = \"macos\"\n  },\n  [\"main.cf.proto\"] = {\n    color = \"#ff966c\",\n    cterm_color = \"66\",\n    icon = \"󰒓\",\n    name = \"main.cf.proto\"\n  },\n  [\"makefile.am\"] = {\n    color = \"#fca7ea\",\n    cterm_color = \"66\",\n    icon = \"󱁤\",\n    name = \"makefile.am\"\n  },\n  manjaro = {\n    color = \"#c3e88d\",\n    cterm_color = \"66\",\n    icon = \"󱘊\",\n    name = \"manjaro\"\n  },\n  [\"maxima-init.mac\"] = {\n    color = \"#c8d3f5\",\n    cterm_color = \"66\",\n    icon = \"󰫺\",\n    name = \"maxima-init.mac\"\n  },\n  [\"meson_options.txt\"] = {\n    color = \"#82aaff\",\n    cterm_color = \"66\",\n    icon = \"󰫺\",\n    name = \"meson_options.txt\"\n  },\n  mint = {\n    color = \"#c3e88d\",\n    cterm_color = \"66\",\n    icon = \"󰣭\",\n    name = \"mint\"\n  },\n  mkv = {\n    color = \"#c3e88d\",\n    cterm_color = \"66\",\n    icon = \"󰈫\",\n    name = \"mkv\"\n  },\n  mov = {\n    color = \"#4fd6be\",\n    cterm_color = \"66\",\n    icon = \"󰈫\",\n    name = \"mov\"\n  },\n  mp3 = {\n    color = \"#0db9d7\",\n    cterm_color = \"66\",\n    icon = \"󰈣\",\n    name = \"mp3\"\n  },\n  mp4 = {\n    color = \"#0db9d7\",\n    cterm_color = \"66\",\n    icon = \"󰈫\",\n    name = \"mp4\"\n  },\n  mpeg = {\n    color = \"#fca7ea\",\n    cterm_color = \"66\",\n    icon = \"󰈫\",\n    name = \"mpeg\"\n  },\n  mpg = {\n    color = \"#fca7ea\",\n    cterm_color = \"66\",\n    icon = \"󰈫\",\n    name = \"mpg\"\n  },\n  nixos = {\n    color = \"#0db9d7\",\n    cterm_color = \"66\",\n    icon = \"󱄅\",\n    name = \"nixos\"\n  },\n  ogg = {\n    color = \"#c8d3f5\",\n    cterm_color = \"66\",\n    icon = \"󰈣\",\n    name = \"ogg\"\n  },\n  [\"package.json\"] = {\n    color = \"#c3e88d\",\n    cterm_color = \"66\",\n    icon = \"\",\n    name = \"package.json\"\n  },\n  png = {\n    color = \"#fca7ea\",\n    cterm_color = \"66\",\n    icon = \"󰸭\",\n    name = \"png\"\n  },\n  pps = {\n    color = \"#ff757f\",\n    cterm_color = \"66\",\n    icon = \"󱎐\",\n    name = \"pps\"\n  },\n  ppsm = {\n    color = \"#ff757f\",\n    cterm_color = \"66\",\n    icon = \"󱎐\",\n    name = \"ppsm\"\n  },\n  ppsx = {\n    color = \"#ff757f\",\n    cterm_color = \"66\",\n    icon = \"󱎐\",\n    name = \"ppsx\"\n  },\n  ppt = {\n    color = \"#ff757f\",\n    cterm_color = \"66\",\n    icon = \"󱎐\",\n    name = \"ppt\"\n  },\n  pptm = {\n    color = \"#ff757f\",\n    cterm_color = \"66\",\n    icon = \"󱎐\",\n    name = \"pptm\"\n  },\n  pptx = {\n    color = \"#ff757f\",\n    cterm_color = \"66\",\n    icon = \"󱎐\",\n    name = \"pptx\"\n  },\n  [\"pudb.cfg\"] = {\n    color = \"#0db9d7\",\n    cterm_color = \"66\",\n    icon = \"󰯂\",\n    name = \"pudb.cfg\"\n  },\n  purs = {\n    color = \"#c8d3f5\",\n    cterm_color = \"66\",\n    icon = \"\",\n    name = \"purs\"\n  },\n  rar = {\n    color = \"#c3e88d\",\n    cterm_color = \"66\",\n    icon = \"󰗄\",\n    name = \"rar\"\n  },\n  raspberry_pi = {\n    color = \"#ff757f\",\n    cterm_color = \"66\",\n    icon = \"󰐿\",\n    name = \"raspberry_pi\"\n  },\n  redhat = {\n    color = \"#ff757f\",\n    cterm_color = \"66\",\n    icon = \"󱄛\",\n    name = \"redhat\"\n  },\n  [\"requirements.txt\"] = {\n    color = \"#fca7ea\",\n    cterm_color = \"66\",\n    icon = \"󱘎\",\n    name = \"requirements.txt\"\n  },\n  [\"robots.txt\"] = {\n    color = \"#c8d3f5\",\n    cterm_color = \"66\",\n    icon = \"󰚩\",\n    name = \"robots.txt\"\n  },\n  rpm = {\n    color = \"#ff757f\",\n    cterm_color = \"66\",\n    icon = \"󰗄\",\n    name = \"rpm\"\n  },\n  [\"setup.cfg\"] = {\n    color = \"#0db9d7\",\n    cterm_color = \"66\",\n    icon = \"󰯂\",\n    name = \"setup.cfg\"\n  },\n  sit = {\n    color = \"#ff757f\",\n    cterm_color = \"66\",\n    icon = \"󰗄\",\n    name = \"sit\"\n  },\n  snd = {\n    color = \"#ff757f\",\n    cterm_color = \"66\",\n    icon = \"󰈣\",\n    name = \"snd\"\n  },\n  tar = {\n    color = \"#4fd6be\",\n    cterm_color = \"66\",\n    icon = \"󰗄\",\n    name = \"tar\"\n  },\n  [\"tclsh.rc\"] = {\n    color = \"#ff757f\",\n    cterm_color = \"66\",\n    icon = \"󰛓\",\n    name = \"tclsh.rc\"\n  },\n  tf = {\n    color = \"#82aaff\",\n    cterm_color = \"66\",\n    icon = \"󱁢\",\n    name = \"tf\"\n  },\n  tgz = {\n    color = \"#c8d3f5\",\n    cterm_color = \"66\",\n    icon = \"󰗄\",\n    name = \"tgz\"\n  },\n  tif = {\n    color = \"#ffc777\",\n    cterm_color = \"66\",\n    icon = \"󰈟\",\n    name = \"tif\"\n  },\n  tiff = {\n    color = \"#ffc777\",\n    cterm_color = \"66\",\n    icon = \"󰈟\",\n    name = \"tiff\"\n  },\n  [\"tsconfig.build.json\"] = {\n    color = \"#0db9d7\",\n    cterm_color = \"66\",\n    icon = \"\",\n    name = \"tsconfig.build.json\"\n  },\n  [\"tsconfig.json\"] = {\n    color = \"#0db9d7\",\n    cterm_color = \"66\",\n    icon = \"\",\n    name = \"tsconfig.json\"\n  },\n  txz = {\n    color = \"#fca7ea\",\n    cterm_color = \"66\",\n    icon = \"󰗄\",\n    name = \"txz\"\n  },\n  ubuntu = {\n    color = \"#ff966c\",\n    cterm_color = \"66\",\n    icon = \"󰕈\",\n    name = \"ubuntu\"\n  },\n  wav = {\n    color = \"#c3e88d\",\n    cterm_color = \"66\",\n    icon = \"󰈣\",\n    name = \"wav\"\n  },\n  webm = {\n    color = \"#c8d3f5\",\n    cterm_color = \"66\",\n    icon = \"󰈫\",\n    name = \"webm\"\n  },\n  webp = {\n    color = \"#82aaff\",\n    cterm_color = \"66\",\n    icon = \"󰈟\",\n    name = \"webp\"\n  },\n  windows = {\n    color = \"#82aaff\",\n    cterm_color = \"66\",\n    icon = \"󰖳\",\n    name = \"windows\"\n  },\n  wma = {\n    color = \"#82aaff\",\n    cterm_color = \"66\",\n    icon = \"󰈣\",\n    name = \"wma\"\n  },\n  wmv = {\n    color = \"#82aaff\",\n    cterm_color = \"66\",\n    icon = \"󰈫\",\n    name = \"wmv\"\n  },\n  xls = {\n    color = \"#c3e88d\",\n    cterm_color = \"66\",\n    icon = \"󱎏\",\n    name = \"xls\"\n  },\n  xlsm = {\n    color = \"#c3e88d\",\n    cterm_color = \"66\",\n    icon = \"󱎏\",\n    name = \"xlsm\"\n  },\n  xlsx = {\n    color = \"#c3e88d\",\n    cterm_color = \"66\",\n    icon = \"󱎏\",\n    name = \"xlsx\"\n  },\n  xlt = {\n    color = \"#c3e88d\",\n    cterm_color = \"66\",\n    icon = \"󱎏\",\n    name = \"xlt\"\n  },\n  xltm = {\n    color = \"#c3e88d\",\n    cterm_color = \"66\",\n    icon = \"󱎏\",\n    name = \"xltm\"\n  },\n  xltx = {\n    color = \"#c3e88d\",\n    cterm_color = \"66\",\n    icon = \"󱎏\",\n    name = \"xltx\"\n  },\n  xz = {\n    color = \"#c3e88d\",\n    cterm_color = \"66\",\n    icon = \"󰗄\",\n    name = \"xz\"\n  },\n  [\"yarn.lock\"] = {\n    color = \"#82aaff\",\n    cterm_color = \"66\",\n    icon = \"\",\n    name = \"yarn.lock\"\n  },\n  z = {\n    color = \"#c8d3f5\",\n    cterm_color = \"66\",\n    icon = \"󰗄\",\n    name = \"z\"\n  },\n  zip = {\n    color = \"#0db9d7\",\n    cterm_color = \"66\",\n    icon = \"󰗄\",\n    name = \"zip\"\n  },\n  zst = {\n    color = \"#ffc777\",\n    cterm_color = \"66\",\n    icon = \"󰗄\",\n    name = \"zst\"\n  }\n}",
--       kind = "text-pasteboard-item"
--     },
--   }
-- }
--
-- local icons_by_name = create_icons_lookup(captured_output)
--
-- if icons_by_name then
--     print("Lookup table created with", vim.tbl_count(icons_by_name), "entries.")
--     -- Example: Get the icon data for '.bashrc'
--     local bashrc_icon_data = icons_by_name[".bashrc"]
--     if bashrc_icon_data then
--         print(".bashrc Icon:", bashrc_icon_data.icon)
--         print(".bashrc Color:", bashrc_icon_data.color)
--     else
--         print(".bashrc not found in lookup.")
--     end
--
--     -- Example: Get the default icon data
--     local default_icon_data = icons_by_name["Default"]
--      if default_icon_data then
--         print("Default Icon:", default_icon_data.icon)
--         print("Default Color:", default_icon_data.color)
--     else
--         print("Default not found in lookup.")
--     end
-- end

-- Return the function definition if this is part of a module
return create_icons_lookup
