Versions in this module Expand all Collapse all v1 v1.0.1 Nov 19, 2024 Changes in this version + const PROC_THREAD_ATTRIBUTE_PSEUDOCONSOLE — windows/amd64 + const TIOCGWINSZ — darwin/amd64, js/wasm, linux/amd64 + const TIOCSWINSZ — darwin/amd64, js/wasm, linux/amd64 + var ErrUnsupported = errors.New("unsupported") + func Getsize(t FdHolder) (rows, cols int, err error) + func InheritSize(pty Pty, tty Tty) error + func Open() (Pty, Tty, error) + func Setsize(t FdHolder, ws *Winsize) error + type DeadlineHolder interface + SetDeadline func(t time.Time) error + type FdHolder interface + Fd func() uintptr + type Pty interface + Name func() string + WriteString func(s string) (n int, err error) + func Start(cmd *exec.Cmd) (Pty, error) + func StartWithAttrs(c *exec.Cmd, sz *Winsize, attrs *syscall.SysProcAttr) (Pty, error) + func StartWithSize(c *exec.Cmd, sz *Winsize) (Pty, error) + type Tty interface + Name func() string + type WindowsPty struct — windows/amd64 + func (p *WindowsPty) Close() error + func (p *WindowsPty) Fd() uintptr + func (p *WindowsPty) Name() string + func (p *WindowsPty) Read(data []byte) (int, error) + func (p *WindowsPty) SetDeadline(value time.Time) error + func (p *WindowsPty) UpdateProcThreadAttribute(attrList *windows.ProcThreadAttributeListContainer) error + func (p *WindowsPty) Write(data []byte) (int, error) + func (p *WindowsPty) WriteString(s string) (int, error) + type WindowsTty struct — windows/amd64 + func (t *WindowsTty) Close() error + func (t *WindowsTty) Fd() uintptr + func (t *WindowsTty) Name() string + func (t *WindowsTty) Read(p []byte) (int, error) + func (t *WindowsTty) SetDeadline(value time.Time) error + func (t *WindowsTty) Write(p []byte) (int, error) + type Winsize struct + Cols uint16 + Rows uint16 + X uint16 + Y uint16 + func GetsizeFull(t FdHolder) (size *Winsize, err error)