xterminal

package
v1.34.2 Latest Latest
Warning

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

Go to latest
Published: Jul 20, 2022 License: GPL-3.0 Imports: 1 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Package xterminal provides functions to change termios or console attributes and restore them later on. It supports Unix and Windows.

This does the same thing as x/crypto/ssh/terminal on Linux. On Windows, it sets the same console modes as the terminal package but also sets `ENABLE_VIRTUAL_TERMINAL_INPUT` and `ENABLE_VIRTUAL_TERMINAL_PROCESSING` to allow for VT100 sequences in the console. This is important, otherwise Linux apps (with colors or ncurses) that are run through SSH or wsep get garbled in a Windows console.

More details can be found out about Windows console modes here: https://docs.microsoft.com/en-us/windows/console/setconsolemode

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Restore

func Restore(fd uintptr, state *State) error

Restore terminal back to original state.

Types

type State

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

State differs per-platform.

func MakeOutputRaw

func MakeOutputRaw(fd uintptr) (*State, error)

MakeOutputRaw does nothing on non-Windows platforms.

Jump to

Keyboard shortcuts

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