consistent command line processing-usage

This commit is contained in:
kepler155c@gmail.com
2019-07-23 13:30:13 -06:00
parent 3665bfb26a
commit 10df63ae9e
5 changed files with 31 additions and 13 deletions

View File

@@ -1,3 +1,5 @@
local Util = require('opus.util')
local device = _G.device
local multishell = _ENV.multishell
local os = _G.os
@@ -6,9 +8,9 @@ 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]
local args = Util.parse(...)
local name = args[1] or error('Syntax: termShare [--title=title] term_name')
local title = args.title
device[name] = term.current()
device[name].name = name