diff options
| author | Gabriel Schneider <[email protected]> | 2026-09-27 20:35:01 -0300 |
|---|---|---|
| committer | Gabriel Schneider <[email protected]> | 2026-10-01 00:12:14 -0300 |
| commit | c3e2cd3b854964ca7db3798cb8750ee6d0833057 (patch) | |
| tree | 0073c6bb6ec4cd78fffa89b2880dd83b4a106e1d /docs/fs.md | |
| parent | 5d9a56d47a9cd5eefc4c8bf03709f2e96febb212 (diff) | |
| download | pardes-c3e2cd3b854964ca7db3798cb8750ee6d0833057.tar.gz pardes-c3e2cd3b854964ca7db3798cb8750ee6d0833057.zip | |
pty/run says cut when its output's start is gone, and reads only a bounded tail
A clear or reset while the command ran, a start or end mark that came on
the alternate screen, or a garbage end pin read as a complete answer;
now any of them, like a start that scrolled out, answers exit N cut.
The output is read from at most output_rows rows above its end instead
of the whole history on the editor's thread (cut if that clips it), a D
with no status answers exit ? rather than exit 0, and running out of
memory answers error out of memory rather than cut.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Diffstat (limited to 'docs/fs.md')
| -rw-r--r-- | docs/fs.md | 19 |
1 files changed, 14 insertions, 5 deletions
@@ -218,11 +218,20 @@ the same open (factotum's `rpc` shape): write the line, then read `exit N` once the command has ended and the shell is back at a prompt, followed by what it printed. The output is what the screen showed between the command's start and end marks: stderr interleaved, `\r` progress collapsed to its last -state, no colour; a full-screen program (vim, less) leaves none, and rows a -program redrew above its start are missed. Only its last 64 KiB are kept, -from a line start, and the header then reads `exit N cut M` (M bytes left -out), or `exit N cut` when its start scrolled out of the history. The header -is always the whole first line. It reads +state, no colour, tabs as the spaces they drew, trailing spaces trimmed and +trailing blank lines dropped (`printf 'a\n\n\n'` answers `a`), leading +whitespace kept; a program on the alternate screen (vim, less, htop) leaves +none, and rows a program redrew above its start are missed. A bash job notice +printed before its PROMPT_COMMAND lands in the next run's output. Only its +last 64 KiB are kept, from a line start, and the header then reads `exit N +cut M` (M bytes left out). `exit N cut`, with no count, says the output's +start is not there to read: it scrolled out of the history, the command +erased it (`clear`, a reset), a start or end mark came on the alternate +screen, or the command printed more than 8192 rows, of which only the last +are read so that the answer costs the editor a bounded amount. `exit ?` is a +command whose end mark carried no status, which is not a success; `error out +of memory` is an answer that could not be made. The header is always the +whole first line. It reads `busy` at once when a command is running, text is typed at the prompt or the shell has not drawn its first prompt; `error not run` when the shell refused the line without running it (a fish syntax error; the line is taken back off |
