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
+6 -2
View File
@@ -1,10 +1,13 @@
import type { KeyBind } from "../terminal/keybindRegistry";
import type { Bash, Result } from "./bash";
import { cd } from "./commands/cd";
import { clear } from "./commands/clear";
import { ls } from "./commands/ls";
import { aSync } from "./commands/testAsync";
export type ICommand = {
method: (this: Bash, args: CommandArgs) => Result;
method: (this: Bash, args: CommandArgs) => Promise<Result>;
keybinds?: Map<KeyBind, () => any>;
flags: string[];
help: string;
root: boolean;
@@ -24,7 +27,8 @@ export type CommandResultData = {
export const COMMANDS = {
cd,
ls,
clear
clear,
aSync
} as const satisfies Record<string, ICommand>;
/* //export const commands {