terminal

package
v0.8.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 14, 2019 License: MIT, BSD-3-Clause Imports: 1 Imported by: 0

Documentation

Overview

Package terminal provides support functions for dealing with terminals.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func EnableVirtualTerminalProcessing

func EnableVirtualTerminalProcessing(fd int) error

EnableVirtualTerminalProcessing configures the terminal to accept ANSI sequences. This is a no-op for all operating systems other than Windows.

func GetSize

func GetSize(fd int) (width, height int, err error)

GetSize returns the dimensions of the given terminal.

func IsTerminal

func IsTerminal(fd int) bool

IsTerminal returns true if the given file descriptor is a terminal.

Types

type State

type State struct {
	// contains filtered or unexported fields
}

State contains the state of a terminal.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL