figgycity50, on 27 October 2013 - 12:08 PM, said:
i still dont get how to fix it
*insert face into palm* have you read my signature lately? ... this is your one and only free answer from me...
local function findFile(path)
if fs.exists(dir..path) then
return true, dir..path
elseif fs.exists("/rom/programs/"..path) then
return true, "/rom/programs/"..path
else
for a,p in shell.aliases() do --# is this even a real, and/or iterable function? o.O
if a == path then
return true, p
end
end
end
return false
end
while true do
write("[email protected]"..os.computerID().." $ "..dir)
local command = read()
if command == "exit" then
break
else
local exists, path = findFile(command)
if exists then
shell.run(path)
else
print("Unknown command: "..command)
end
end
end