terminal

package
v1.0.92 Latest Latest
Warning

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

Go to latest
Published: May 29, 2025 License: MIT Imports: 4 Imported by: 1 module, 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 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