Versions in this module Expand all Collapse all v0 v0.1.1 Apr 19, 2026 v0.1.0 Apr 19, 2026 Changes in this version + var ErrClosed = errors.New("pty: closed") + func RestoreTerminal(fd uintptr, state *TerminalState) error + func Start(cmd *Cmd, opt ...StartOption) (PTYCmd, Process, error) + type Cmd struct + Args []string + Context context.Context + Dir string + Env []string + Path string + func Command(name string, arg ...string) *Cmd + func CommandContext(ctx context.Context, name string, arg ...string) *Cmd + func (c *Cmd) AsExec() *exec.Cmd + type Option func(*ptyOptions) + func WithGPGTTY() Option + func WithLogger(logger *log.Logger) Option + func WithSSHRequest(req ssh.Pty) Option + type PTY interface + Input func() ReadWriter + Name func() string + Output func() ReadWriter + Resize func(height uint16, width uint16) error + func New(opts ...Option) (PTY, error) + type PTYCmd interface + InputWriter func() io.Writer + OutputReader func() io.Reader + Resize func(height uint16, width uint16) error + type Process interface + Kill func() error + Signal func(sig os.Signal) error + Wait func() error + type ReadWriter struct + Reader io.Reader + Writer io.Writer + func (rw ReadWriter) Read(p []byte) (int, error) + func (rw ReadWriter) Write(p []byte) (int, error) + type StartOption func(*startOptions) + func WithPTYOption(opts ...Option) StartOption + type TerminalState struct + func MakeInputRaw(fd uintptr) (*TerminalState, error) + func MakeOutputRaw(fd uintptr) (*TerminalState, error)