package pty
import "github.com/creack/pty"
Package pty provides functions for working with Unix terminals.
Index ¶
- Variables
- func Getsize(t *os.File) (rows, cols int, err error)
- func InheritSize(pty, tty *os.File) error
- func Open() (pty, tty *os.File, err error)
- func Setsize(*os.File, *Winsize) error
- type Winsize
Variables ¶
ErrUnsupported is returned if a function is not available on the current platform.
Functions ¶
func Getsize ¶
Getsize returns the number of rows (lines) and cols (positions in each line) in terminal t.
func InheritSize ¶
InheritSize applies the terminal size of pty to tty. This should be run in a signal handler for syscall.SIGWINCH to automatically resize the tty when the pty receives a window size change notification.
func Open ¶
Open a pty and its corresponding tty.
func Setsize ¶
Setsize resizes t to s.
Types ¶
type Winsize ¶
type Winsize struct { Rows, Cols, X, Y uint }
Winsize is a dummy struct to enable compilation on unsupported platforms.
func GetsizeFull ¶
GetsizeFull returns the full terminal size description.
Source Files ¶
doc.go pty_unsupported.go winsize.go winsize_unsupported.go ztypes_amd64.go
- Version
- v1.1.14
- Published
- Jul 27, 2021
- Platform
- windows/amd64
- Imports
- 2 packages
- Last checked
- now –
Tools for package owners.