wrappedreadline

package
v0.10.6 Latest Latest
Warning

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

Go to latest
Published: Sep 19, 2017 License: MPL-2.0 Imports: 5 Imported by: 0

Documentation

Overview

wrappedreadline is a package that has helpers for interacting with readline from a panicwrap executable.

panicwrap overrides the standard file descriptors so that the child process no longer looks like a TTY. The helpers here access the extra file descriptors passed by panicwrap to fix that.

panicwrap should be checked for with panicwrap.Wrapped before using this librar, since this library won't adapt if the binary is not wrapped.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func IsTerminal

func IsTerminal() bool

IsTerminal determines if this process is attached to a TTY.

func Override

func Override(cfg *readline.Config) *readline.Config

Override overrides the values in readline.Config that need to be set with wrapped values.

func TerminalWidth

func TerminalWidth() int

TerminalWidth gets the terminal width in characters.

Types

type RawMode

type RawMode struct {
	StdinFd int
	// contains filtered or unexported fields
}

RawMode is a helper for entering and exiting raw mode.

func (*RawMode) Enter

func (r *RawMode) Enter() (err error)

func (*RawMode) Exit

func (r *RawMode) Exit() error

Jump to

Keyboard shortcuts

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