terminal

package
v0.0.19 Latest Latest
Warning

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

Go to latest
Published: Sep 23, 2020 License: Unlicense Imports: 12 Imported by: 0

Documentation

Index

Constants

View Source
const BackOffReadInitialSleepDuration = time.Millisecond
View Source
const BackOffReadMaxSleepDuration = time.Millisecond * 16

Variables

This section is empty.

Functions

This section is empty.

Types

type Terminal

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

Terminal communicates with the underlying terminal which is running shox

func NewTerminal

func NewTerminal() *Terminal

NewTerminal creates a new terminal instance

func (*Terminal) AddDecorator

func (t *Terminal) AddDecorator(d decorators.Decorator)

AddDecorator adds a decorator to alter the terminal output

func (*Terminal) ForceRedraw added in v0.0.18

func (t *Terminal) ForceRedraw()

func (*Terminal) HideOutput added in v0.0.18

func (t *Terminal) HideOutput()

func (*Terminal) Pty added in v0.0.6

func (t *Terminal) Pty() *os.File

Pty exposes the underlying terminal pty, if it exists

func (*Terminal) Run

func (t *Terminal) Run(commands ...string) error

Run starts the terminal/shell proxying process

func (*Terminal) SetDir added in v0.0.18

func (t *Terminal) SetDir(dir string)

SetDir sets the directory the shell will start in (CWD)

func (*Terminal) SetMOTD added in v0.0.18

func (t *Terminal) SetMOTD(motd string)

SetMOTD sets the motd to write to the terminal before the main command is launched

func (*Terminal) SetNestingAllowed added in v0.0.7

func (t *Terminal) SetNestingAllowed(allowed bool)

SetNestingAllowed sets whether multiple shox bars can be nested inside each other

func (*Terminal) SetShell

func (t *Terminal) SetShell(shell string)

SetShell sets the shell program being used by the terminal

func (*Terminal) ShowOutput added in v0.0.18

func (t *Terminal) ShowOutput()

Jump to

Keyboard shortcuts

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