added terminal app with example hello world
This commit is contained in:
17
src/bin/HelloWorld.hx
Normal file
17
src/bin/HelloWorld.hx
Normal 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;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user