terminal

package
v0.3.8 Latest Latest
Warning

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

Go to latest
Published: Jun 7, 2017 License: GPL-3.0 Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Control

type Control interface {
	ErrPasteIndicator() error
	Escape(Terminal) EscapeCodes
	GetSize(int) (int, int, error)
	MakeRaw(int) (interface{}, error)
	NewTerminal(io.ReadWriter, string) Terminal
	Restore(int, interface{}) error
	SetAutoCompleteCallback(Terminal, func(string, int, rune) (string, int, bool))
}

Control represents terminal control

type ControlFactory

type ControlFactory func() Control

ControlFactory represents a function that can create a Control

type EscapeCodes

type EscapeCodes struct {
	Black, Red, Green, Yellow, Blue, Magenta, Cyan, White []byte
	Reset                                                 []byte
}

EscapeCodes represents the escape codes used for a specific terminal

type Terminal

type Terminal interface {
	ReadLine() (string, error)
	ReadPassword(string) (string, error)
	SetBracketedPasteMode(bool)
	SetPrompt(string)
	SetSize(int, int) error
	Write([]byte) (int, error)
}

Terminal represents terminal control

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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