terminal

package
v0.0.0-...-b43479a Latest Latest
Warning

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

Go to latest
Published: Aug 3, 2026 License: MIT Imports: 8 Imported by: 0

Documentation

Overview

Package terminal manages short-lived local PTY sessions.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Manager

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

func NewManager

func NewManager() *Manager

func (*Manager) Close

func (m *Manager) Close(id string)

func (*Manager) Get

func (m *Manager) Get(id string) (*Session, bool)

func (*Manager) Start

func (m *Manager) Start(directory string, columns, rows uint16) (string, error)

Start runs the user's login shell.

func (*Manager) StartCommand

func (m *Manager) StartCommand(directory string, columns, rows uint16, argv []string) (string, error)

StartCommand runs an explicit argv instead of the shell, which is how a terminal lands directly inside a tmux session. argv is passed to exec as separate arguments and never through a shell, so a session name cannot become a command.

type Session

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

func (*Session) Input

func (s *Session) Input(body []byte) error

func (*Session) Output

func (s *Session) Output(offset int) ([]byte, int, bool)

func (*Session) Resize

func (s *Session) Resize(columns, rows uint16) error

Jump to

Keyboard shortcuts

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