osc

package
v0.0.55 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 5, 2026 License: Apache-2.0 Imports: 1 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Package osc reads OSC 7501 state reports from a terminal's output and says what the engine's terminal answers to the queries an agent's program sends. It does no I/O: a Reader is fed bytes and returns what it found.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Reader

type Reader struct {
	// contains filtered or unexported fields
}

Reader reads reports from a stream however it is split between Feeds. The zero value is ready to use.

func (*Reader) Feed

func (r *Reader) Feed(p []byte) (reports []Report, answers []byte)

Feed reads p and returns the reports the engine acts on (state working, blocked or done, with no id key) and the bytes the terminal answers: for the 7501 query and for a primary device attributes query. Nothing else is reported or answered.

type Report

type Report struct {
	State, App string
	Fields     map[string]string
}

Report is one state report a program wrote to its terminal. Fields holds every other key of the report, unknown ones included.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL