From c2e58c827bd8d2497c86b2eca23ac096cb972296 Mon Sep 17 00:00:00 2001 From: Gabriel Schneider Date: Tue, 29 Sep 2026 15:47:52 -0300 Subject: A ctl or exec line with no newline runs with its write and fails it, unless it needs more A last line with no newline was held to the close, so printf bogus > ctl answered 0 and failed only in the log, Edit ,s/zzz/y/ too. A write shorter than its Twrite is the whole of what was written (acme takes each write whole): its tail runs then and a failure is the write's. It is held only when the parser says it needs more -- an open { block, an a/c/i text -- or when the write filled its Twrite and may go on (the listener tells the core the room, msize less its header). Co-Authored-By: Claude Opus 5.5 --- docs/fs.md | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) (limited to 'docs/fs.md') diff --git a/docs/fs.md b/docs/fs.md index 83906d0a..7b1e47bf 100644 --- a/docs/fs.md +++ b/docs/fs.md @@ -518,12 +518,13 @@ A write of command lines -- to `look`, `exec`, `tagexec`, a `ctl` of the root, a pane or a column, or a column's `exec` -- runs each line once it is whole: a mount cuts a big write at its message size (4 KiB through the kernel's, 8 KiB from a client that asks), anywhere, and each piece comes as -a write of its own, so the open keeps a last line with no newline yet, or -an Edit block whose text has not ended, until its next write, and runs it -then; what is left when it closes runs at the close -- so a line written -with no newline (`printf Save > exec`) runs only as the file closes, after -the write has been answered, and its failure is in the log alone: end each -line with its newline to have the write itself fail -- where an Edit block +a write of its own. A write that fills its piece may go on in the next, so +the open keeps its last line with no newline until then; a write shorter +than a piece is the whole of what was written, as acme takes each write, so +its last line runs with it even with no newline (`printf Save > exec`), and +a failure is that write's. Only what needs more is held: an Edit block +whose `{` or `a`/`c`/`i` text has not ended waits for its next write, and +what is left when the file closes runs at the close -- where an Edit block whose `{` or `a`/`c`/`i` text never ended fails and changes nothing (``unmatched `{'``, or `a, c or i text not ended by a . line`, logged as an `err`): sam takes the end of input for a `.`, but a block that reaches Edit -- cgit v1.3