get_keys(3)
π get_keys(3) β like, the Arcan Lua API one, bestie
okay so real talk, this one lives in the Arcan Lua API section of your manual, and it's the little helper you call when you need to see everything at once. no cap.
β¨ NAME β¨
get_keys β grab all the keys tied to a target, or to a target + config pair π
π¦ SYNOPSIS π¦
kvtbl
get_keys( targetname, configname )
πΈ DESCRIPTION πΈ
so this function is for those corner cases β you know the ones β where you genuinely need to explicitly enumerate or filter every single key:value pair associated with a targetname, or with a targetname + configname pair. the vibe is: when plain get_key calls or match_keys calls just wouldn't work. that's the whole gig. π«Ά
π₯ NOTES π₯
- the output
kvtblwill always be a table, even if thetargetname, or thetargetname+confignamecombo, doesn't resolve to a valid target and config. but like β the table itself will just be empty. π so yeah, you literally cannot distinguish between valid and invalid targets here. it's giving "no thoughts, head empty." π
π EXAMPLE π
function get_keys0()
local tbl = list_targets();
if (#tbl == 0) then
warning("get_keys test must be run on a database with a valid target");
return shutdown();
end
store_key("test1", "testval", tbl[1]);
store_key("test2", "testval", tbl[2]);
for k,v in ipairs(get_keys(tbl[1])) do
print(k, v);
end
end
π SEE ALSO π
databaseβ go look at this one too, bestie, it's the related icon β¨
π fr fr, that's the whole page. go forth and enumerate.
Arcan Lua API Β· October 2026 Β· mwah, ty for reading, ily π
π¦ where this page comes from
- nixos 26.05: arcan 0.7.1
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms