added terminal app with example hello world

This commit is contained in:
2022-12-15 14:21:26 +01:00
parent 1863462b44
commit 2b8aa06117
4 changed files with 203 additions and 0 deletions

17
src/bin/HelloWorld.hx Normal file
View File

@@ -0,0 +1,17 @@
package bin;
import lib.TermHandle;
import kernel.fs.FileHandler.WriteHandle;
import lib.CLIBase;
class HelloWorld extends CLIBase {
public function invoke(handle: TermHandle):Bool {
var world:String = "world";
if (handle.args.length > 0) {
world = handle.args[0];
}
handle.write('Hello, $world!');
return true;
}
}