Skip to content

Conversation

@pluiedev
Copy link
Member

What it says on the tin. The precise list is OSCs 0-2, 4, 5, 7, 9, 9;4, 10-19, 22, 52, 104, 105 and 110-119.

Also expanded the concept page about control sequences and added a concept page detailing the color syntax we support.

@vercel
Copy link

vercel bot commented Nov 21, 2025

@pluiedev is attempting to deploy a commit to the Ghostty Team on Vercel.

A member of the Team first needs to authorize it.

@pluiedev pluiedev force-pushed the pluie/jj-poqplzsntrln branch from 749f151 to 8fb52d4 Compare November 21, 2025 16:18
@pluiedev pluiedev force-pushed the pluie/jj-poqplzsntrln branch from 8fb52d4 to 4a6a129 Compare November 21, 2025 16:20
Copy link
Contributor

@00-kat 00-kat left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

N.B.: I did sometimes try to maintain hard-wrap in suggestions but not always, so they may need re-wrapping.

Comment on lines +117 to +123
An OSC sequence begins with OSC (`ESC ]` or `0x9d`). Then, by convention, an
integer is added to identify the operation

OSC Sequences are typically used to encode strings or other non-integer data to
transmit between the terminal and the application. The format of an OSC sequence
is below. An example OSC sequence is `OSC 2 ; 👻 Ghostty 👻 ST` (where `ST` is
the String Terminator). By convention, OSC sequences *usually* have some integer
identifier to identify the sequence.
The format of an OSC sequence is below. By convention, OSC sequences are
identified by an integer identifier followed by a semicolon (`;`), although
this is never required by the standard. Certain obsolete OSC sequences use
non-numeric identifiers before the semicolon, but Ghostty does not support
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The convention of adding an integer is mentioned twice on adjacent sentences.

Suggested change
An OSC sequence begins with OSC (`ESC ]` or `0x9d`). Then, by convention, an
integer is added to identify the operation
OSC Sequences are typically used to encode strings or other non-integer data to
transmit between the terminal and the application. The format of an OSC sequence
is below. An example OSC sequence is `OSC 2 ; 👻 Ghostty 👻 ST` (where `ST` is
the String Terminator). By convention, OSC sequences *usually* have some integer
identifier to identify the sequence.
The format of an OSC sequence is below. By convention, OSC sequences are
identified by an integer identifier followed by a semicolon (`;`), although
this is never required by the standard. Certain obsolete OSC sequences use
non-numeric identifiers before the semicolon, but Ghostty does not support
The format of an OSC sequence is below. An OSC sequence begins with OSC (`ESC ]`
or `0x9d`). Then, by convention, an integer is added to identify the operation,
followed by a semicolon (`;`), although this is never required by the standard.
Certain obsolete OSC sequences use non-numeric identifiers before the semicolon,
but Ghostty does not support

this is never required by the standard. Certain obsolete OSC sequences use
non-numeric identifiers before the semicolon, but Ghostty does not support

> [!NOTE]
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Having a note that interrupts a line reads really weirdly to me; I don't know how it renders on the website but the file's contents and GitHub's rendered view both look odd.

I think the note should be moved under the format description (i.e. right above the DCS heading), since otherwise the format is quite far away from “The format of an OSC sequence is below” in the first line of the paragraph before the note.

identifier to identify the sequence.
The format of an OSC sequence is below. By convention, OSC sequences are
identified by an integer identifier followed by a semicolon (`;`), although
this is never required by the standard. Certain obsolete OSC sequences use
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There has not been a mention of the standard before this, and no other mention clarifies which standard is being referred to: many OSCs have their own standard that require the integer identifier, so this might cause confusion.

Also I feel like “specified” is a better term than “required” here since OSCs can't be parsed without some way to know what's being parsed (as it's just arbitrary data), so there's always some means of identifying it and including the identifier is required even if the standard doesn't say what the identifier looks like or where it goes.

osc_sequence = "0x1B" "]" data terminator
data = [0x20-0xFF]
ST = "0x1B" "0x5C"
terminator = "0x1B" "0x5C"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Shouldn't BEL be included here?

Suggested change
terminator = "0x1B" "0x5C"
terminator = "0x1B" "0x5C" | "0x07"

Comment on lines +17 to +18
Below is a list of protocols that Ghostty supports, which originate from other
terminal emulators:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this list actually exhaustive? I could assume it's close for just OSCs but the page is in /docs/vt and not /docs/vt/osc, and it's missing at the very least KIP (I haven't tried to determine what else is missing, this is just the first one I thought of since the page on sequences mentions it). It might be worth noting this “isn't exhaustive” or is “still work in progress”?

When `d` is the single character `?`, the terminal will reply with
another OSC 52 sequence with the data found from the first clipboard
listed in `t` that contains the requested data.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this could use an example: while it's obvious what the response looks like, it's not particularly obvious what the t value is in the presence of multiple clipboards in t.

Edit: Ghostty seems to just do nothing…?

@@ -0,0 +1,72 @@
---
title: Colors
description: All sorts of information regarding colors in terminal emulation.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
description: All sorts of information regarding colors in terminal emulation.
description: Assorted information about colors in terminals.

“All sorts of” → “Assorted” was just one of… assorted changes, but “terminal emulation” to me feels like an obscure way to put it, and “terminals” over “terminal emulators” since that seems to be more common in these docs.

<VTSequence sequence={["#", "Pr", "Pg", "Pb"]} />

Where each of `r`, `g` and `b` can be one to four hexadecimal digits,
corresponding to 4, 8, 12 or 16 bit color channels respectively.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Other docs use a serial comma.

Suggested change
corresponding to 4, 8, 12 or 16 bit color channels respectively.
corresponding to 4, 8, 12, or 16 bit color channels respectively.

<VTSequence sequence={["#", "Pr", "Pg", "Pb"]} />

Where each of `r`, `g` and `b` can be one to four hexadecimal digits,
corresponding to 4, 8, 12 or 16 bit color channels respectively.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
corresponding to 4, 8, 12 or 16 bit color channels respectively.
corresponding to 4, 8, 12 and 16 bit color channels respectively.

I think.

description: All sorts of information regarding colors in terminal emulation.
---

Ghostty emulates a full 256-color palette, as well as 5 **special colors**
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Might it also be useful to note what the 256-color palette is?

@mitchellh mitchellh merged commit d3b82df into ghostty-org:main Dec 2, 2025
2 of 3 checks passed
@mitchellh
Copy link
Contributor

I think there are a bunch of improvements that can be made but I'm going to accept this as a general net positive. Thank you.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants