Skip to main content

Module program_resume

Module program_resume 

Source
Expand description

Program resume reports through OSC 7577.

A report tells the terminal which command brings the program back after the terminal restarts. The terminal decides whether to store the record and whether to run it. A clear report removes the record.

Writers use ESC ] 7577 ; pairs ESC \. Each argv element and the cwd are standard base64 of UTF-8. The final mac key is the SHA-256 hash of the body before :mac=, one :, and the token from TOKEN_ENV. The token never appears in the output.

Support is present when TOKEN_ENV is set. The protocol has no query.

See the protocol specification.

Structs§

ProgramResume
A resume command, with borrowed text.

Constants§

MAX_ARGV
Largest number of argv elements that every supporting terminal accepts.
MAX_SEQUENCE_LEN
Largest complete sequence, in bytes, that every supporting terminal accepts.
TOKEN_ENV
Environment variable that holds the terminal’s OSC 7577 token.

Functions§

write_program_resume
Write one program resume report without flushing.
write_program_resume_clear
Write one clear report for pid without flushing.