1 line
715 B
Lua
1 line
715 B
Lua
local a=import("filesystem")local b={...}local c=b[1]b=nil;if not c then local a,b,c=a.open("/halyde/apps/helpdb/default.txt","r"),"",nil;repeat c=a:read(math.huge or math.maxinteger)b=b..(c or"")until not c;print(b)return end;if shell.aliases[c]then c=shell.aliases[c]end;if a.exists("/halyde/apps/helpdb/"..c..".txt")then local a,b,d=a.open("/halyde/apps/helpdb/"..c..".txt","r"),"",nil;repeat d=a:read(math.huge or math.maxinteger)b=b..(d or"")until not d;print(b)local a=table.copy(shell.aliases)if table.find(a,c)then local b=table.find(a,c)local d="Aliases:\n "..b;a[b]=nil;while table.find(a,c)do b=table.find(a,c)d=d..", "..b;a[b]=nil end;print(d)end else print("Could not find help file for: "..c..".")end |