[HN Gopher] Standards for ANSI Escape Codes
___________________________________________________________________
Standards for ANSI Escape Codes
Author : nikbackm
Score : 15 points
Date : 2025-03-08 10:02 UTC (12 hours ago)
(HTM) web link (jvns.ca)
(TXT) w3m dump (jvns.ca)
| tssva wrote:
| dup https://news.ycombinator.com/item?id=43294471
| kazinator wrote:
| I don't use terminfo. It is less standardized than ANSI terminal
| control. POSIX defines next to nothing about it beyond its
| existence.
|
| While it can help programs work with totally different terminals,
| that has next to no value in the world in which everything speaks
| ANSI.
|
| There are terminal-specific extensions to ANSI. Some of those are
| popular and so de facto standard. You can get away with using
| them.
|
| terminfo won't help you with the ones that don't work everywhere.
| It cannot magically make a feature appear where it doesn't exist.
|
| Antirez's Linenoise line editing library uses the escape goes
| directly. This is brilliant and helps it achieve its small size
| and no dependencies.
|
| Every time I need to make any kind of program that uses terminal
| features I just use the sequences likewise.
___________________________________________________________________
(page generated 2025-03-08 23:01 UTC)