Color and escape codes in text/gemini
Michael Lazar lazar.michael22 at gmail.com
Fri Dec 13 05:02:20 GMT 2019
On Thu, Dec 12, 2019 at 10:18 AM Jason McBrayer <jmcbray at carcosa.net> wrote:
> 1. That all Gemini clients are running on a terminal (emulator) that
> interprets ANSI escape codes (or the client provides enough terminal
> emulation to interpret these escape codes).
>
> 2. That ANSI escape codes sent by Gemini pages will only interact with
> your terminal in a safe way.
>
> 3. That it is desirable for untrusted content from the Internet to be
> able to control your terminal.
>
> I, honestly, don't think any of these are true.
I agree, and adding to this:
4. That gemini terminal clients write text directly to stdout.
Libraries like curses maintain their own internal screen buffer and don't allow
passing through raw escape codes. Doing so would likely break any TUI display
anyway, since escape codes could also change the cursor position.
My opinion is that ANSI escape codes should be neither endorsed nor prohibited
in the Gemini protocol. Even prohibiting them would add additional complexity,
because then servers would need to worry about what's a valid gemini document
and what isn't. Treat it as a fun little easter egg and leave it at that.
- mozz
Archive home | About this archive