aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--alv/copilot/cli.moon9
1 files changed, 8 insertions, 1 deletions
diff --git a/alv/copilot/cli.moon b/alv/copilot/cli.moon
index e4e633a..14bfd6b 100644
--- a/alv/copilot/cli.moon
+++ b/alv/copilot/cli.moon
@@ -7,12 +7,19 @@ import parse_args, Copilot from require 'alv.copilot.base'
import sleep from require 'system'
class ColorLogger extends Logger
+ new: (...) =>
+ super ...
+ @time_pref = ''
+
set_time: (time) =>
super time
- @stream\write switch time
+ @time_pref = switch time
when 'eval' then '\27[92m'
when 'run' then '\27[0m'
+ put: (msg) =>
+ super @time_pref .. msg
+
class CLICopilot extends Copilot
new: (arg) =>
super parse_args arg, { nocolor: false, 'udp-server': false }