dotfiles from arch

This commit is contained in:
2025-09-28 11:39:12 +02:00
parent 75885729cd
commit d1c6923bbb
1358 changed files with 575835 additions and 0 deletions

View File

@@ -0,0 +1,27 @@
local function mergeKey(key, k)
if not key then
return k
end
if k:sub(1, 1):match '%w' then
return key .. '.' .. k
else
return key .. k
end
end
local function proxy(results, key)
return setmetatable({}, {
__index = function (_, k)
return proxy(results, mergeKey(key, k))
end,
__newindex = function (_, k, v)
results[mergeKey(key, k)] = v
end
})
end
return function (text, path, results)
results = results or {}
assert(load(text, '@' .. path, "t", proxy(results)))()
return results
end