a lot of "drunk code", processes need rethinking, terminal initializes but commands dont go through to IO

This commit is contained in:
2026-03-16 18:05:07 +01:00
parent b40fa704c6
commit 18aeeb200f
14 changed files with 322 additions and 42 deletions
+43
View File
@@ -0,0 +1,43 @@
import type { KeyBind } from "$lib/stores/terminal/keybindRegistry";
import { type Bash, type Result } from "../bash";
import type { CommandArgs, ICommand } from "../commandRegistry";
import { ExitCode } from "../metadata";
export const cmd_async = async function(this: Bash, args: CommandArgs): Promise<Result> {
let result: Result = { exitCode: ExitCode.ERROR, path: this.getCwd() };
result.exitCode = ExitCode.SUCCESS;
return result;
}
const test_keybind: KeyBind = [
{
key: 'a',
modifiers: [
'Shift'
]
}
];
function test(): void {
console.log("Keybind works");
}
const keybinds: Map<KeyBind, () => any> = new Map([
[test_keybind,test]
]);
export const aSync: ICommand = {
method: cmd_async,
keybinds: keybinds,
flags: [] as string[],
help: 'PATH TO HELP.md',
root: false
};