feat: improve bash-like command parsing

This commit is contained in:
binekrasik
2026-05-19 18:22:43 +02:00
parent b5f53473ed
commit 4a484dd546
8 changed files with 399 additions and 105 deletions

15
src/program/Printf.ts Normal file
View File

@@ -0,0 +1,15 @@
import { Item } from '../fs/Item'
import type { SimpleStream } from '../utils/SimpleStream'
import { Program } from './Program'
export class Printf extends Program {
constructor() {
super()
}
async Exec(_: SimpleStream<string>, stdout: SimpleStream<string>, __: Item, args: string[]): Promise<number> {
stdout.emit(args.slice(1).join(' '))
return 0
}
}