44 points · by ankitg12 · 5mo ago · 22 comments
Then find DEC and XTerm extensions https://invisible-island.net/xterm/ctlseqs/ctlseqs.html
These aren't an extension. They're either part of ECMA-48 like the color codes or legacy from VT52/VT100 that has become de facto standard.
This isn't no much a specification as a collection of variously supported codes.
Some have been deliberately killed off (like setting the window title to the string returned from a commandline string). An escape code so powerful that it gives text files shell access.
C0 in ISO 6429
C1 in ECMA-48
Though, the big one is C1. OS commands and CSI (graphics, cursors, etc.) are both defined in it.
And hyperlinks have sorta default to ESC]8 but its not in any of the standards. Ta to Gnome and VTE for making it semi-supported everywhere.
The Linux manpage for ANSI escapes is pretty comprehensive as a catalogue. [1] If you're looking for what you can actually use, and what has been deprecated, man should be the first stop.
[1] https://man7.org/linux/man-pages/man4/console_codes.4.html
The Linux console_codes(4) man page is only what escape sequences are supported by the Linux VT console, which you probably aren't using. You are more likely using a GUI terminal emulator under Wayland or X, in which case you need to look at the docs for that terminal emulator.
Most terminal emulators have more comprehensive support than the VT console does, so if the VT console supports it, a recent terminal emulator probably will too. The exception is "Linux Console Private CSI Sequences", which I doubt terminal emulators would support, although some of them could be supported.
Huh? Most of them have less. And none of them will have documented the OS-specific escapes, because that's kinda the role of console_codes.
xterm-specific things, which supports more than most other emulators, and a lot more than VT, is documented in... console_codes. Sure, they have their own documentation, too.
But console_codes is absolutely not only what is supported by the Linux VT console.