Thanks Piero!
The help is still correct: DataAvailable and ErrorAvailable deliver chunks of text, which can contain part of a line, a complete line, or several lines. A partial line doesn’t mean anything has been truncated; the rest arrives in subsequent events.
For line-based parsing, accumulate the chunks in a string, process each complete line, and retain the unfinished remainder for the next event. When Completed fires, process any remaining text too. Always waiting for a newline inside Shell would delay output from programs that report progress without sending newlines.
For ffmpeg specifically, I’d use its machine-readable progress output, for example:
ffmpeg -nostats -progress pipe:1 -i input.mp4 output.mp4
That sends key=value progress lines to stdout, so you can handle them through DataAvailable. Each progress report ends with progress=continue or progress=end. You still need to allow for lines being split across events. FFmpeg’s normal progress display goes to stderr and uses carriage returns to update the same terminal line.
On interactive shells, yes, the individual program’s requirements matter too. zsh -i makes zsh interactive, but some programs also require a pseudo-terminal. Writing to standard input and providing a terminal session are separate capabilities that would need documenting.
Thanks for sharing the quoting helper too. That’s useful for values embedded in a Unix shell command string. With the arguments-array form, pass individual arguments without adding shell quotes. If you pass the command following zsh -lc as an array entry, it doesn’t need an extra outer layer of shell quoting either.
Regarding TextArea.InsertText, I agree that updating a read-only log from code is a reasonable expectation. Currently, insertion goes through an editing path that respects ReadOnly. For now, you can append by assigning Text without unlocking the control:
LogArea.Text = LogArea.Text + data
I also checked the PDF code and found a bug that explains your line-number report: unticking Line numbers removes the space reserved for them, but the renderer still draws the numbers. That needs correcting.