"\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.
Inspect ANSI control codes and escape sequences
21–30 of 52 posts
Re: Inspect ANSI control codes and escape sequences
#22I would have loved this in 1993. Not that I don't now, but I would have had a real use for it then.
Re: Inspect ANSI control codes and escape sequences
#23I've used the tool sequin in the past to debug issues: https://github.com/charmbracelet/sequin It worked great for me, seems much easier to debug logs directly in the terminal.
Re: Inspect ANSI control codes and escape sequences
#24No support for blinking text.
Re: Inspect ANSI control codes and escape sequences
#25This is really cool - I've been experimenting with terminal escape sequences recently, and they go deep. Thanks for sharing! Get in touch (email in profile) if you'd like to collaborate.
Re: Inspect ANSI control codes and escape sequences
#26Earlier quoted context omitted.
They are not special cased: https://github.com/webpro/ANSI.tools/blob/main/packages/parser/src/parsers/csi.ts#L12 The comment correctly identifies the 0x30-0x3f range as parameter bytes and the following as intermediate bytes. Both the range and the names for the bytes are matching ECMA-48 Chapter 5.4. But you seem to think that everyone except yourself is incompetent, are you trying to make up for something?
Of course they are. There's a file with all of the special cased constants in, named constants.ts. Your superficial test tested all three of the special cases in the PRIVATE_OPENERS array, which is what the parser.ts code actually checks. DEC's question mark, which is special cased yet further off on its own, is in reality another "private opener", too, and it isn't limited to DEC (e.g. XQTMODKEYS), and neither does…
Re: Inspect ANSI control codes and escape sequences
#27Re: Inspect ANSI control codes and escape sequences
#28Earlier quoted context omitted.
That tells me that you are writing from ignorance, as for starters that's a truly pathetic test that even misses one of the characters that I explicitly mentioned above, let alone thoroughly tests the full range that the specs define. I had an actual poke around the parser code, in contrast to your superficial experimentation. (-: One can, with knowledge, actually find the point where the only three unusual character…
They are not special cased: https://github.com/webpro/ANSI.tools/blob/main/packages/parser/src/parsers/csi.ts#L12 The comment correctly identifies the 0x30-0x3f range as parameter bytes and the following as intermediate bytes. Both the range and the names for the bytes are matching ECMA-48 Chapter 5.4. But you seem to think that everyone except yourself is incompetent, are you trying to make up for something?
Re: Inspect ANSI control codes and escape sequences
#29Earlier quoted context omitted.
The parser has, but not the HTML renderer indeed. Using a third-party lib for that currently, but noticed the limitations too. Might replace it with my own!
Great! Next step: torturetest.vt
Re: Inspect ANSI control codes and escape sequences
#30Neat tool, I could see this being handy for debugging TUI tools. I noticed that it works with _escaped_ ESC characters ("\x1b", "\u001b", "\033") but it didn't recognize raw ESC characters that I had in my clipboard. It might be useful to support those (maybe highlight them similarly to how VS Code highlights whitespace characters). The characters show up as numbered unicode error glyphs (I'm on Firefox, if that help…