Documentation
¶
Overview ¶
Package terminal implements a streaming VT screen and native shell sessions. It has no dependencies outside the Go standard library.
Index ¶
Constants ¶
This section is empty.
Variables ¶
var ErrClosed = errors.New("terminal session is closed")
var ErrInputFull = errors.New("terminal input queue is full")
var Palette = [16]Color{0x1e1e1e, 0xcd3131, 0x0dbc79, 0xe5e510, 0x2472c8, 0xbc3fbc, 0x11a8cd, 0xe5e5e5, 0x666666, 0xf14c4c, 0x23d18b, 0xf5f543, 0x3b8eea, 0xd670d6, 0x29b8db, 0xffffff}
Functions ¶
Types ¶
type Process ¶
type Process interface {
io.ReadWriteCloser
Resize(cols, rows int) error
Wait() error
}
type Screen ¶
type Screen struct {
Title string
Cells []Cell
History []Cell
MouseTracking int
Cols, Rows int
Scrolled uint64
Revision uint64
HistoryLimit int
DefaultForeground, DefaultBackground Color
CursorVisible, ApplicationCursor, BracketedPaste bool
MouseSGR bool
// contains filtered or unexported fields
}
Screen is owned by the foreground. Feed accepts arbitrary byte boundaries.
func (*Screen) HistoryRow ¶
HistoryRow returns a chronological row from the bounded scrollback ring.
type Session ¶
type Session struct {
// contains filtered or unexported fields
}
Session bounds both queues. Output applies backpressure instead of dropping bytes (dropping even one byte can corrupt a VT sequence). No worker touches UI.
func (*Session) Close ¶
func (s *Session) Close()
Close never waits for a process or pipe on the foreground thread.