Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetStdinSize ¶
GetStdinSize returns the size of the stdin terminal
func GetTerminalSize ¶
GetTerminalSize returns the terminal size for the given file descriptor. This is the canonical wrapper for x/term.GetSize — use this instead of importing golang.org/x/term directly.
func IsStdoutTerminal ¶
func IsStdoutTerminal() bool
IsStdoutTerminal checks if stdout is a terminal
func IsTerminalFd ¶
IsTerminalFd checks if a file descriptor is a terminal
Types ¶
type RawMode ¶
type RawMode struct {
// contains filtered or unexported fields
}
RawMode manages putting the terminal into raw mode
func NewRawMode ¶
NewRawMode creates a new RawMode manager for the given file descriptor
func NewRawModeStdin ¶
func NewRawModeStdin() *RawMode
NewRawModeStdin creates a RawMode manager for stdin
func (*RawMode) IsTerminal ¶
IsTerminal checks if the file descriptor is a terminal
type Term ¶
type Term struct {
// contains filtered or unexported fields
}
Term holds detected terminal capabilities and file descriptors.
func FromEnv ¶
func FromEnv() *Term
FromEnv creates a Term by reading from the real system environment.
func (*Term) Is256ColorSupported ¶
Is256ColorSupported returns true if the terminal supports 256 colors.
func (*Term) IsColorEnabled ¶
IsColorEnabled returns true if basic color output is supported.
func (*Term) IsTrueColorSupported ¶
IsTrueColorSupported returns true if the terminal supports 24-bit true color.