ziglibs / ansi-term

Zig library for dealing with ANSI terminals
MIT License
66 stars 7 forks source link

Add ANSI terminal "mocking" #1

Open joachimschmidt557 opened 4 years ago

joachimschmidt557 commented 4 years ago

I think it would be nice to include a terminal emulator (basically an interpreter for ANSI escape sequences) in this repository as well. Something along the lines of https://github.com/selectel/pyte for example.

This would enable testing zig libraries and applications which use ANSI escape sequences for correct display without requiring a "real" terminal emulator like xterm and manually checking the output. Maybe this can even help in developing "real" full-featured terminal emulators.

data-man commented 4 years ago

alacritty/vte and wezterm/vtparse based on A parser for DEC’s ANSI-compatible video terminals Here is C-implementation: vtparse

joachimschmidt557 commented 4 years ago

@data-man Thanks for the material! I'll have a look at them before I can implement such a feature.

joachimschmidt557 commented 4 years ago

But maybe a full-featured VTE parser should belong into a new repository. Hmm