implemented the cd command - not tested properly
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user