Skip to main content

Module osc

Module osc 

Source
Expand description

The OSC 133 scanner: exact command marks from the shell’s own integration.

The shell writes OSC 133 ; A at the prompt start, ; B at the prompt end, ; C before a command runs and ; D [;<exit>] when it finishes. The scanner reads those sequences out of the byte stream before the bytes reach Term, records the marks, and leaves the bytes untouched - the client sees exactly what the shell wrote.

A sequence split across two reads is carried in the scanner’s own state, so a mark is never lost to a read boundary.

Structs§

Marks
The marks seen so far, and the state they imply.
Osc133
The OSC 133 scanner.

Enums§

Mark
One command mark the shell emitted.
Scan 🔒
The scanner’s position in the byte stream.

Constants§

MAX_PAYLOAD 🔒
The most of one OSC payload the scanner keeps. A clipboard write can be megabytes; the scanner only needs the 133; prefix, so a payload past this is discarded rather than held.