diff options
| author | Gabriel Schneider <[email protected]> | 2026-09-29 02:11:15 -0300 |
|---|---|---|
| committer | Gabriel Schneider <[email protected]> | 2026-10-01 00:12:15 -0300 |
| commit | 3db73735e9a8d88878bc9ee343f226c033320913 (patch) | |
| tree | 93c52cd0d4d2008d765c862651464684e15006d6 /docs | |
| parent | b29de1d4e78466a15f5d3dc0916410cba1445c5f (diff) | |
| download | pardes-3db73735e9a8d88878bc9ee343f226c033320913.tar.gz pardes-3db73735e9a8d88878bc9ee343f226c033320913.zip | |
A command line cut across writes runs once whole, and look/exec answer per open
A mount cuts a write at its message size, and each piece ran on its own: a
line cut at the boundary ran as shell commands and a 50 KB Edit block
broke. An open of look, exec, tagexec, any ctl or a column's exec now keeps
an unfinished last line, or an Edit block still open, until its next write
or its release, and never runs a fragment. The same open record holds what
its last write touched, which a read on it answers (as /net/tcp/clone
does); an open that never wrote reads the session's last as of its open.
A release that runs a held line waits for quiet and counts as a change;
a clicked line with a control character is still refused at its write.
Tested in unit tests, fs.py (python client, 8 KiB) and selfmount.py (the
kernel mount, a 1000-line seq burst and a 50 KB Edit block).
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Diffstat (limited to 'docs')
| -rw-r--r-- | docs/fs.md | 18 |
1 files changed, 18 insertions, 0 deletions
@@ -378,6 +378,24 @@ pane a look focused or the pane an exec acted on (even one it closed), one per line; a look that found text answers the pane the text is selected in, not the hits buffer it opened. +The answer belongs to the open, as /net/tcp/clone's does: an open that +wrote reads what its own last write touched, from the start after each +write, whatever offset the read comes at (a shell's `exec 3<>look` shares +one offset between its write and its read, as with `pty/run`); an open +that never wrote reads the session's last answer as it stood when it was +opened. So `echo x > look; cat look` works for one client, but two +clients doing it at once may read each other's; for that, write and read +on one open: `exec 3<>$m/look; echo x >&3; cat <&3; exec 3<&-`. + +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. A fragment never runs +on its own. A line or Edit block held past 1 MiB is refused (EINVAL). + A look takes acme's addresses after a colon (editors/acme/look.c:450): a line written to `look` as `file:/re/`, `file:#n`, `file:$` or any address opens (or finds) the file and selects what the address names. **The |
