Bugfixes and improvements

- ls fixed
- fixed a bug where ~ wouldnt resolve properly
- temporarily increased the process chunking treshold, because chunking breaks formatting
- added clear
- added pwd
This commit is contained in:
2026-09-06 00:26:09 +02:00
parent 776a93e21b
commit b75e691a0b
8 changed files with 443 additions and 199 deletions
+23
View File
@@ -0,0 +1,23 @@
import type { CommandDescriptor, CommandOutput } from "@core/command";
import type { CommandIO } from "@core/command_io";
import { createSuccessResult, type ResultSuccess } from "@core/result";
import type { ShellState } from "@core/shell_state";
import type { ShellError } from "@core/util/errors";
export const COMMAND_NAME = "clear";
async function main(io: CommandIO, state: ShellState, __args: string[]): Promise<CommandOutput<ShellError>> {
io.writeStdout(new TextEncoder().encode("\x1b[2J\x1b[0;0H"));
const result: ResultSuccess = createSuccessResult(COMMAND_NAME);
return {
state: state,
result,
};
}
export const descriptor: CommandDescriptor = {
fn: main,
name: COMMAND_NAME,
};