Support Ghostty 1.4, version 1.0.2

The built-in schema now describes Ghostty 1.4.0: 212 options, the new
choices of copy-on-select, window-padding-balance = equal, number limits
that also take "unlimited", and categories for the new options.

genschema reads Ghostty's compatibility table, so old names and values
Ghostty still accepts are no longer reported as errors: a renamed key
such as scrollback-limit is shown in yellow and renamed in place with
enter, a replaced option names its successors, and old values such as
copy-on-select = true are accepted with a note.

Theme previews expand ~/ like Ghostty 1.4 and only look where Ghostty
looks for user themes. Theme names with parentheses of their own keep
them. A live test checks every ghostty command against the installed
Ghostty. Docs and screenshots updated for 1.4.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
mikeandClaude Opus 5.5 committed 2026-10-28 10:44:23 +01:00
1 parent fb5602452a
commit df261910c5
26 files changed
+920 -132

No files matched your search

+30 -2
View File
@@ -204,6 +204,8 @@ func (a *App) renderOpts(w, h int) string {
selected := i == a.optIdx
keySt := lipgloss.NewStyle()
switch {
case a.sch.OldKey(o.Key) != nil:
keySt = stChanged // still read by Ghostty, but no longer documented
case a.unknown[o.Key] == o:
keySt = stError
case o.Platform != "" && a.osName != "" && o.Platform != a.osName:
@@ -294,6 +296,8 @@ func (a *App) valueSegs(o *schema.Option, w int) []seg {
if o.Validate(v) != nil {
st = stError
}
} else if _, ov, ok := a.oldName(o); ok {
v, st = ov, stChanged // set under the option's old name
}
if v == "" {
return []seg{styled("—", stDim)}
@@ -370,6 +374,12 @@ func (a *App) docContent(o *schema.Option, w int) string {
row := func(label, value string) {
b.WriteString(stLabel.Render(label) + " " + ansi.Wrap(value, max(10, w-10), "") + "\n")
}
// note is an indented remark below the value, wrapped to the panel.
note := func(st lipgloss.Style, text string) {
for _, l := range strings.Split(ansi.Wrap(text, max(10, w-10), ""), "\n") {
b.WriteString(" " + st.Render(l) + "\n")
}
}
if a.editor == nil {
row("Type", o.TypeLabel())
vals := a.file.GetAll(o.Key)
@@ -401,9 +411,13 @@ func (a *App) docContent(o *schema.Option, w int) string {
def = sw + " " + def
}
row("Default", strings.ReplaceAll(def, "\t", "\\t"))
if len(vals) == 0 {
oldKey, oldVal, hasOld := a.oldName(o)
switch {
case len(vals) == 0 && hasOld:
row("Value", oldVal+" "+stChanged.Render("● set as "+oldKey))
case len(vals) == 0:
row("Value", stDim.Render("not set (uses default)"))
} else {
default:
v := vals[len(vals)-1]
if sw := swatch(v); sw != "" && o.Kind == schema.KindColor {
v = sw + " " + v
@@ -411,11 +425,25 @@ func (a *App) docContent(o *schema.Option, w int) string {
row("Value", v+" "+stSet.Render("● set in config"))
if err := o.Validate(vals[len(vals)-1]); err != nil {
b.WriteString(stError.Render(" ✗ invalid: "+err.Error()) + "\n")
} else if o.IsOldValue(vals[len(vals)-1]) {
text := "an old value; Ghostty " + a.sch.GhosttyVersion + " still reads it"
if len(o.Values) > 0 {
text += ", but the current values are " + strings.Join(o.Values, ", ")
}
note(stChanged, text)
}
if len(vals) > 1 {
b.WriteString(stChanged.Render(fmt.Sprintf(" set %d times; the last one wins", len(vals))) + "\n")
}
}
if hasOld {
text := "Ghostty also reads the old name " + oldKey + " as this option. " +
"Select it under " + catSet + " and press enter to rename it."
if len(vals) > 0 {
text += " As both are set, the line further down wins."
}
note(stChanged, text)
}
}
if o.Platform != "" {
row("Platform", o.Platform+" only")