Hacker News new | ask | show | jobs
by 112233 337 days ago
"\u001b[0m — reset" ... what? Why SGR is not called by name, while, e.g. CUU is? strange... According to which terminal or standard it interperts sequences?

Is this tool really helpful? It does look nice! But it does not help with the corneriest cases that would benefit from such tool the most.

1 comments

Got to start somewhere! Didn't see many examples to get inspired by either. Here's the full table: https://ansi.tools/lookup. This is my initial take on it. Please bring in the corneriest cases! It's open source so bug reports, RFCs and pull requests are most welcome.
This thing is made out of corner cases: https://www.invisible-island.net/vttest/

I am sure capturing it's output will provide endless source of amusement and despair.

There are sequences from real terminal (e.g. stuff documented at vt100.net), sequences from ECMA 48 and friends (most of it likely never implemented), and de-facto behaviour of different software. Infamous examples being original windows terminal, rxvt (ugh), linux co nsole, emacs terminal.

Most vexing behaviour is background fill on newline, incorrect characters in terminal reports, broken scroll region, inability to write in bottom-right position etc.

This project looks fun! But it leads to endless narrow abandoned places. Hopefully you will enjoy the experience!

Ghostty the terminal emulator has a cell inspector feature along these same lines