commands

package
v0.0.0-...-ad3cfc1 Latest Latest
Warning

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

Go to latest
Published: Dec 16, 2019 License: LGPL-3.0 Imports: 1 Imported by: 1

Documentation

Overview

Package commands implement common output commands for the termianl

Index

Constants

This section is empty.

Variables

View Source
var Commands = map[string]Command{

	"SMCUP":         "\x1b[?1049h\x1b[22;0;0t",
	"RMCUP":         "\x1b[?1049l\x1b[23;0;0t",
	"HIDECURSOR":    "\x1b[?25l",
	"SHOWCURSOR":    "\x1b[?25h",
	"SOFTRESET":     "\x1b[>!p",
	"ENABLEMOUSE":   "\x1b[?1000;1006;1015h",
	"DISABLEMOUSE":  "\x1b[?1000;1006;1015l",
	"CLEAR":         "\x1b\x0c",
	"CURSORUP":      "\x1bA",
	"CURSORDOWN":    "\x1bB",
	"CURSORRIGHT":   "\x1bC",
	"CURSORLEFT":    "\x1bD",
	"CURSORHOME":    "\x1bH",
	"ERASEBELOW":    "\x1b[0J",
	"ERASEABOVE":    "\x1b[1J",
	"ERASEALL":      "\x1b[2J",
	"GETWINDOWSIZE": "\x1b[18t",
	"CURSORUPN":     "\x1b[%dA",
	"GOTO":          "\x1b[%d;%dH",
	"ENABLEPASTE":   "\x1b[?2004h",
	"DISABLEPASTE":  "\x1b[?2004l",
	"CHARSTYLE":     "\x1b[%sm",
	"BGCOLOR":       "\x1b[48;2;%d;%d;%dm",
	"FGCOLOR":       "\x1b[38;2;%d;%d;%dm",
}

Commands is the list of fixed commands

Functions

func Sequence

func Sequence(name string, args ...interface{}) []byte

Sequence generate the given command with the provided arguments

Types

type Command

type Command string

Command represent a CSI sequence

func (Command) Sequence

func (c Command) Sequence(args ...interface{}) []byte

Sequence render the Control Sequence

Jump to

Keyboard shortcuts

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