implement shell command interface and add basic commands (echo, ls, pwd, cd, touch, cat, rm) with syscall integration
All checks were successful
Master Build / Build and Push Docker Image (amd64) (push) Successful in 53s
Master Build / Update running container (push) Successful in 52s

This commit is contained in:
2025-01-23 15:22:42 -03:00
parent 2817165386
commit f39333cae6
18 changed files with 519 additions and 46 deletions

15
src/shell/commands/cat.ts Normal file
View File

@@ -0,0 +1,15 @@
import { IShellCommand } from "./IShellCommand";
import { ShellSyscall } from "../ShellSyscall";
export class cat implements IShellCommand {
constructor(private syscall: ShellSyscall) {}
getName(): string {
return "cat";
}
execute(args: string[]): string {
if (args.length === 0) return "cat: missing file operand";
return this.syscall.readFile(args[0]);
}
}