a lot of "drunk code", processes need rethinking, terminal initializes but commands dont go through to IO
This commit is contained in:
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user