Expand description
The size cap on what a terminal pane keeps of its output (the term file in
the pane’s zone). A command that prints without end (yes) was stored whole:
2.5 GB and a 4.3 GB write-ahead log in 100 s. The file is now circular: it
holds the last term:storedoutputmb megabytes (50 by default, 0 for no
limit), offsets stay absolute so readers that remember where they were keep
working, and the parts below the window are deleted as the file grows
(FileStore::trim_circular_head). Agent transcripts are a different file and
are not touched.
Constants§
- SETTING
- The settings.json key, whole megabytes.
- TERM_
FILE - The block file the cap applies to.
- TRIMMED_
NOTICE - Written into the stream once, when the first output is dropped, so the pane (live and on reload, until it scrolls out of the window) says so.
Functions§
- after_
append - After
datawas appended to a pane’stermat offsetstart: bring the file to the cap, and drop the parts that fell out of its window. Returns true when output has been dropped from the file and not yet announced, anddataends where a line of text can be inserted (not inside a character or an escape sequence, which the next read of the PTY continues), so the caller can writeTRIMMED_NOTICEafter it. At a bad boundary the notice waits for a later append. A store error is logged and costs nothing but the trim. - apply_
setting - Take the setting’s value (
None: not set, or not a whole number of megabytes, which means the default). Called whenever settings change. - cap_
bytes - The cap in bytes; 0 means no limit.
- term_
opts - The options a new
termfile is made with.