Documentation
¶
Index ¶
- Constants
- func GetControlChar(f *os.File, name string) (c byte, err error)
- func GetWinSize(f *os.File) (width, height int, err error)
- func Open() (pty, tty *os.File, err error)
- func SetCBreak(f *os.File) (err error)
- func SetRaw(f *os.File) (err error)
- func SetWinSize(f *os.File, cols uint16, rows uint16) error
- func Tcsetattr(f *os.File, state *State) (err error)
- type State
- type Terminal
- func (t *Terminal) Close() (err error)
- func (t *Terminal) GetWinSize() (x, y int, err error)
- func (t *Terminal) Read(b []byte) (n int, err error)
- func (t *Terminal) ResetWinSize() error
- func (t *Terminal) Restore() (err error)
- func (t *Terminal) SendEOF() (err error)
- func (t *Terminal) SendIntr() (err error)
- func (t *Terminal) SetCBreak() (err error)
- func (t *Terminal) SetRaw() (err error)
- func (t *Terminal) SetWinSize(x, y int) error
- func (t *Terminal) Start(c *exec.Cmd) (err error)
- func (t *Terminal) Write(b []byte) (n int, err error)
Constants ¶
View Source
const ( IFLAG = 0 OFLAG = 1 CFLAG = 2 LFLAG = 3 ISPEED = 4 OSPEED = 5 CC = 6 )
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Terminal ¶
type Terminal struct { Pty *os.File Tty *os.File Recorder []*os.File Log *os.File // contains filtered or unexported fields }
func NewTerminal ¶
func Start ¶
Start assigns a pseudo-terminal tty os.File to c.Stdin, c.Stdout, and c.Stderr, calls c.Start, and returns the File of the tty's corresponding pty.
func (*Terminal) GetWinSize ¶
func (*Terminal) ResetWinSize ¶
func (*Terminal) SetWinSize ¶
Click to show internal directories.
Click to hide internal directories.