terminal: handle basic coloring

This closes issue 
This commit is contained in:
Morten Minde Neergaard 2022-11-03 08:50:17 +01:00 committed by blinry
parent f4a1230e77
commit 88eeef9a68
3 changed files with 71 additions and 5 deletions
scenes

View file

@ -26,9 +26,12 @@ func run(command, crash_on_fail=true):
exit_code = shell_command.exit_code
return shell_command.output
func run_async(command, crash_on_fail=true):
func run_async(command, pretty_command=null, crash_on_fail=true):
var shell_command = ShellCommand.new()
shell_command.command = command
shell_command.pretty_command = command
if pretty_command:
shell_command.pretty_command = pretty_command
shell_command.crash_on_fail = crash_on_fail
var t = Thread.new()
@ -48,6 +51,7 @@ func run_async_thread(shell_command):
var env = {}
env["HOME"] = game.tmp_prefix
env["TERM"] = "xterm"
var hacky_command = ""
for variable in env: