made luash state the current dir
This commit is contained in:
parent
67789cccae
commit
0e96f9818f
@ -1,10 +1,13 @@
|
|||||||
function luash(si)
|
function luash(si)
|
||||||
spawn("lua shell",function()
|
spawn("lua shell",function()
|
||||||
|
function cd(p)
|
||||||
|
os.setenv("PWD",fs.simplify((os.getenv("PWD") or "")..p))
|
||||||
|
end
|
||||||
coroutine.yield()
|
coroutine.yield()
|
||||||
print(_OSVERSION..", "..string.format("%4d",computer.totalMemory()/1024).."K memory, "..string.format("%4d",computer.freeMemory()/1024).."K free")
|
print(_OSVERSION..", "..string.format("%4d",computer.totalMemory()/1024).."K memory, "..string.format("%4d",computer.freeMemory()/1024).."K free")
|
||||||
print(_VERSION)
|
print(_VERSION)
|
||||||
while true do
|
while true do
|
||||||
write("> ")
|
write((os.getenv("PWD") or "").."> ")
|
||||||
print(pcall(load(readln())))
|
print(pcall(load(readln())))
|
||||||
end
|
end
|
||||||
end,si)
|
end,si)
|
||||||
|
Loading…
Reference in New Issue
Block a user