local utils = require 'utils' -- dirconfig local function not_installed(program) return utils.which(program) == nil 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, }