testing version of LuaBIOS and OpenOS

people were having issues getting them to work so now we promote consistency
This commit is contained in:
2025-06-28 20:41:49 +02:00
parent 8210e20939
commit 687cfebd00
182 changed files with 14016 additions and 1 deletions

20
data/OpenOS/bin/man.lua Normal file
View File

@@ -0,0 +1,20 @@
local fs = require("filesystem")
local shell = require("shell")
local args = shell.parse(...)
if #args == 0 then
io.write("Usage: man <topic>\n")
io.write("Where `topic` will usually be the name of a program or library.\n")
return 1
end
local topic = args[1]
for path in string.gmatch(os.getenv("MANPATH"), "[^:]+") do
path = shell.resolve(fs.concat(path, topic), "man")
if path and fs.exists(path) and not fs.isDirectory(path) then
os.execute(os.getenv("PAGER") .. " " .. path)
os.exit()
end
end
io.stderr:write("No manual entry for " .. topic .. '\n')
return 1