aboutsummaryrefslogtreecommitdiffstats
path: root/init.moon
diff options
context:
space:
mode:
Diffstat (limited to 'init.moon')
-rw-r--r--init.moon15
1 files changed, 13 insertions, 2 deletions
diff --git a/init.moon b/init.moon
index 423bdda..0603c5b 100644
--- a/init.moon
+++ b/init.moon
@@ -4,7 +4,18 @@ import Logger from require 'logger'
import Registry from require 'registry'
import Copilot from require 'copilot'
-Logger.init!
+arguments, key = {}
+for a in *arg
+ if match = a\match '^%-%-(.*)'
+ key = match
+ arguments[key] = true
+ elseif key
+ arguments[key] = a
+ key = nil
+ else
+ table.insert arguments, a
+
+Logger.init arguments.log
delta = do
gettime = ->
@@ -18,7 +29,7 @@ delta = do
last = time
env = Registry!
-copilot = Copilot arg[1], env
+copilot = Copilot arguments[1], env
while true
copilot\poll!