added a quit function to the shell environment, for obvious purposes
This commit is contained in:
parent
194564b959
commit
ec5d938a64
@ -21,6 +21,9 @@ end
|
|||||||
function shell.interactive()
|
function shell.interactive()
|
||||||
local shenv = setmetatable({}, {__index=shindex})
|
local shenv = setmetatable({}, {__index=shindex})
|
||||||
local run = true
|
local run = true
|
||||||
|
function shenv.quit()
|
||||||
|
run = false
|
||||||
|
end
|
||||||
while run do
|
while run do
|
||||||
io.write(string.format("\27[32m%s:%s>\27[0m ",os.getenv("HOSTNAME") or "localhost",(os.getenv("PWD") or _VERSION)))
|
io.write(string.format("\27[32m%s:%s>\27[0m ",os.getenv("HOSTNAME") or "localhost",(os.getenv("PWD") or _VERSION)))
|
||||||
local input = io.read()
|
local input = io.read()
|
||||||
|
Loading…
Reference in New Issue
Block a user