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