Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions term_posix.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,11 @@ type Term struct {
orig syscall.Termios // original state of the terminal, see Open and Restore
}

// Get the underlying file descriptor for use in combination with other system APIs.
func (t *Term) Fd() int {
return t.fd
}

// SetCbreak sets cbreak mode.
func (t *Term) SetCbreak() error {
return t.SetOption(CBreakMode)
Expand Down