implemented the cd command - not tested properly

This commit is contained in:
2026-07-28 05:44:17 +02:00
parent 3b50214041
commit f87aa4eb85
6 changed files with 233 additions and 3 deletions
+3 -1
View File
@@ -1,10 +1,12 @@
import type { CommandDescriptor, CommandOutput } from "@core/command";
import type { ResultSuccess, ShellError } from "@core/result";
import type { ShellError } from "@core/errors";
import type { ResultSuccess } from "@core/result";
import type { ShellState } from "@core/shell_state";
import { createImmutableBuffer } from "@core/util/immutable_buffer";
export const COMMAND_NAME = "echo";
//Need to implement escape sequences
function main(state: ShellState, flags: string[], args: string[]): CommandOutput<ShellError> {
const joined = args.join(" ");
const encoded = new TextEncoder().encode(joined);