2012-09-24 15:24:37 -06:00
|
|
|
local args={...}
|
|
|
|
if args[1]=="--file" or args[1]=="-f" then
|
|
|
|
local f=loadfile (args[2])
|
|
|
|
dfhack.pcall(f,table.unpack(args,3))
|
|
|
|
elseif args[1]~=nil then
|
2012-09-25 01:24:45 -06:00
|
|
|
local f=load(args[1],'=(lua command)', 't')
|
2012-09-24 15:24:37 -06:00
|
|
|
dfhack.pcall(f,table.unpack(args,2))
|
|
|
|
else
|
|
|
|
dfhack.interpreter("lua","lua.history")
|
|
|
|
end
|