terminal

package
v1.0.55 Latest Latest
Warning

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

Go to latest
Published: Dec 25, 2024 License: MIT Imports: 4 Imported by: 0

Documentation

Overview

Package terminal implements terminal evaluation functions.

Index

Constants

View Source
const (
	RETURN  = '\r'
	NEWLINE = '\n'
	BS      = 0x08
	ESCAPE  = 0x1B
	CSI     = '['
	CUB     = 'D'
	ELINE   = 'K'
	SGR     = 'm'
	CUP     = 'H'
	ED      = 'J'
)

https://xfree86.org/4.8.0/ctlseqs.html https://gist.github.com/fnky/458719343aabd01cfb17a3a4f7296797

Variables

This section is empty.

Functions

func Parse

func Parse(data []byte) ([]byte, error)

Parse evaluates ANSI escape sequences

func ParseDropLastReturn added in v1.0.33

func ParseDropLastReturn(data []byte) ([]byte, error)

ParseDropLastReturn evaluates ANSI escape sequences and apply logic related to prompt cut

Types

type Parser

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

Jump to

Keyboard shortcuts

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