make man also look for files ending with .man

This commit is contained in:
Florian Nücke 2014-02-22 21:32:42 +01:00
parent 65a1c58bcf
commit e1c80cbdc8

View File

@ -10,7 +10,7 @@ end
local topic = args[1] local topic = args[1]
for path in string.gmatch(os.getenv("MANPATH"), "[^:]+") do for path in string.gmatch(os.getenv("MANPATH"), "[^:]+") do
path = fs.concat(path, topic) path = shell.resolve(fs.concat(path, topic), "man")
if fs.exists(path) and not fs.isDirectory(path) then if fs.exists(path) and not fs.isDirectory(path) then
os.execute("more " .. path) os.execute("more " .. path)
os.exit() os.exit()