Versions in this module Expand all Collapse all v0 v0.1.0 May 4, 2022 Changes in this version + 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 FdHolder interface + Fd func() uintptr + type Pty interface + Name func() string + WriteString func(s string) (n int, err error) + func Start(c *exec.Cmd) (pty Pty, err error) + func StartWithAttrs(c *exec.Cmd, sz *Winsize, attrs *syscall.SysProcAttr) (Pty, error) + func StartWithAttrs(c *exec.Cmd, sz *Winsize, attrs *syscall.SysProcAttr) (_ Pty, err error) + func StartWithSize(c *exec.Cmd, sz *Winsize) (Pty, error) + func StartWithSize(cmd *exec.Cmd, ws *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) InputPipe() *os.File + func (p *WindowsPty) Name() string + func (p *WindowsPty) OutputPipe() *os.File + func (p *WindowsPty) Read(data []byte) (int, error) + func (p *WindowsPty) Write(data []byte) (int, error) + func (p *WindowsPty) WriteString(s string) (int, error) + type WindowsTty struct — windows/amd64 + func (p *WindowsTty) Name() string + func (t *WindowsTty) Close() error + func (t *WindowsTty) Fd() uintptr + func (t *WindowsTty) Read(p []byte) (int, 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)