4 ms·
Not all terminal emulators follow that completely. Most only include a subset and some include their own proprietary escape codes too (like iTerm and Terminolog
by hnlmorg 4y ago
Not all terminal emulators follow that completely. Most only include a subset and some include their own proprietary escape codes too (like iTerm and Terminology have codes for rendering images. tmux has an escape code for changing the session title).
Then there's other specs not included in that doc even outside of the aforementioned proprietary codes. Like Sixel, conventions on non-POSIX terminals, etc. Also lets not forget the popular-but-not-standardised conventions like the hyperlink escape codes (which I personally think shouldn't exist in the first place....but that's another topic entirely).
Even standard ASCII characters can differ from one platform to another. Backspace being a classic example: ISO 646 describe it as ^H whereas ASCII 1963 has it as ^?
This mess of differing compatibilities is exactly why termcap is a thing.
Being an author of a readline library, this is a topic quite close to my heart :)
- easrng 4y agohTerm and also IIRC kitty have image-rendering escape sequences too.
- hnlmorg 4y agoNot familiar with hTerm. Got a link to the project? Would be good to add support for that to my image rendering library: https://github.com/lmorg/murex/blob/c77b893a58a682735ad7502c1c8464a629f90515/config/defaults/profile_all.mx#L819 https://github.com/lmorg/murex/blob/c77b893a58a682735ad7502c...
- easrng 4y agoUpstream: https://chromium.googlesource.com/apps/libapps/+/HEAD/hterm https://chromium.googlesource.com/apps/libapps/+/HEAD/hterm Fork used by iSH: https://github.com/ish-app/libapps/tree/master/hterm https://github.com/ish-app/libapps/tree/master/hterm I looked at the docs (https://github.com/ish-app/libapps/blob/master/hterm/doc/ControlSequences.md#osc1337-iterm2-sequences-osc-1337 https://github.com/ish-app/libapps/blob/master/hterm/doc/Con...) and it appears to use the same protocol as iTerm. Here's an implementation: https://github.com/ish-app/libapps/blob/master/hterm/etc/hterm-show-file.sh https://github.com/ish-app/libapps/blob/master/hterm/etc/hte...
- hnlmorg 4y agoThank you
- Annatar 4y ago
- hnlmorg 4y ago> > ^? is the code for the [DEL] or [DELETE] key on physical terminals, that's why it's an ASCII standard. > When the PC bucket keyboards came, IBM in their usual idiocy simply put the [BACKSPACE] key where the [DELETE] key normally is, and what's worse, they made it not only move back one space but delete too. Thus came the sadness of everlasting redefining of deletion to be ^H when using a PC bucket keyboard. Indeed. And to confuse things even further, the [DEL] key on IBM keyboards sends the following ANSI escape sequence: [27 91 51 126] So we now have 3 different standards for deleting characters (and that's before you start looking at the escape sequences for deleting rows, nor supporting vi and/or emacs/readline bindings).