local utils = require 'utils' -- dirconfig local function not_installed(program) return utils.nu("which " .. program .. " | is-empty") == "true\n" end local function needs(config, program, glob) if not_installed(program) then table.insert(config.exclude, glob) end end local function enhanced_dircfg(config) setmetatable(config, { __index = { needs = needs } }) return config end return { not_installed = not_installed, needs = needs, enhance_dircfg = enhanced_dircfg, }