package cleanup

This commit is contained in:
kepler155c@gmail.com
2018-12-10 10:33:10 -05:00
parent 37ffae42bd
commit bf3983a7e2
11 changed files with 21 additions and 35 deletions

22
monitor/termShare.lua Normal file
View File

@@ -0,0 +1,22 @@
local device = _G.device
local multishell = _ENV.multishell
local os = _G.os
local term = _G.term
-- list this terminal in the devices list so it's available via
-- peripheral sharing
local args = { ... }
local name = args[1] or error('Syntax: termShare [device name] <title>')
local title = args[2]
device[name] = term.current()
device[name].name = name
device[name].side = name
device[name].type = 'terminal'
if title then
multishell.setTitle(multishell.getCurrent(), title)
end
os.pullEventRaw('terminate')
os.queueEvent('peripheral_detach', name)