Add shell and echo app

This commit is contained in:
2025-11-22 23:43:42 +01:00
parent 29a5cacdea
commit 4bf79e358a
10 changed files with 50 additions and 2 deletions

View File

@@ -0,0 +1 @@
__oskrnl.console_log(__oskrnl.app_args);

View File

@@ -0,0 +1,5 @@
{
"app:name": "echo",
"app:version": "1.0.0",
"app:entrypoint": "index.js"
}

View File

@@ -0,0 +1,23 @@
__oskrnl.console_log("> ");
var input = "";
var inputActive = true;
__oskrnl.input_onKeyPress(function (key) {
if (!inputActive) return;
if (key == "Backspace") input = input.slice(0, -1);
else if (key == "Enter") {
inputActive = false;
process();
return;
} else input += key.toLowerCase();
__oskrnl.console_update("> " + input);
});
function process() {
var app = input.split(" ")[0];
var args = input.split(" ").slice(1);
__oskrnl.app_launcher_run(app, args.join(" "));
}

View File

@@ -0,0 +1,5 @@
{
"app:name": "tysh",
"app:version": "1.0.0",
"app:entrypoint": "index.js"
}

View File

@@ -1 +0,0 @@
It works!

View File

@@ -1 +0,0 @@
console.log("Hello from myApp");

1
test-hdd/ushellc Normal file
View File

@@ -0,0 +1 @@
/disk/apps/tysh