mirror of
https://github.com/git-learning-game/oh-my-git.git
synced 2024-06-29 15:53:31 +02:00
16 lines
381 B
GDScript
16 lines
381 B
GDScript
extends Node2D
|
|
|
|
var thread
|
|
|
|
func send_command(command):
|
|
thread = Thread.new()
|
|
thread.start(self, "run_command_in_a_thread", command)
|
|
|
|
func run_command_in_a_thread(command):
|
|
var output = game.sh(command, "/tmp/active")
|
|
|
|
$Input.text = ""
|
|
$Output.text = $Output.text + "$ " + command + "\n" + output
|
|
$Output.scroll_vertical = 999999
|
|
$"../ActiveRepository".update_everything()
|