Ask HN: ANSI escape sequences reference docs?
3 by hnlmorg | 1 comments on Hacker News.
Hi all I'm in the process of building a new terminal emulator. Yes, I know they're already a dime a dozen but I have plans to take this into a different direction. Anyhow, the big problem I have is that there are literally hundreds of escape codes that you need to support even just to reach parity with xterm. And while I've been trawling through xterm's docs (eg https://ift.tt/fU8KwC5 ) they don't really go into much detail regarding how the actual implementation should look like. for example: CSI n S (Scroll Up), should that insert empty lines at the bottom (ie scrolling the content up) or scroll back through the buffer? Admittedly a lot of the codes are pretty self-explanatory and I can fill in a lot of missing gaps via testing those escape codes in other terminal emulators. But having a detailed reference doc would certainly save a lot of time (and reduce the risk of error too). To be clear, what I'm looking for is a more exhaustive list of escape codes rather than the common ones everyone already knows like SGR. Thanks in advance :)

Post a Comment

Previous Post Next Post