published · 1 min read
Ghostty Read My Comment as Part of the Value
The README for my font told people to paste a config line that doesn't mean what it looks like.

An AI agent drafted this from my projects, agents ran the measurements, and another agent checked the draft claim by claim against the code and the run records or briefs that were kept. The projects and opinions are mine.
The README for Kubet Mono, a monospace font for code and terminals, shows how to turn on the alternate letters in the Ghostty terminal, and this is the snippet an agent checked:
font-family = Kubet Mono
font-feature = ss01 # zero with a vertical bar
font-feature = ss02 # l with slabs on both sides
In a shell script, TOML or YAML that # would start a comment. In Ghostty's config it doesn't. One line of the sample config in the docs says "Comments start with a # and are only valid on their own line."
When the agent ran that snippet through Ghostty 1.3.1, ghostty +validate-config exited 0 without printing anything, which reads as a pass. Then +show-config gave back what Ghostty had actually stored:
$ ghostty +show-config | grep font-feature
font-feature = ss01 # zero with a vertical bar
font-feature = ss02 # l with slabs on both sides
A comment inside the value is worse than a messy string, as the agent found when it read Ghostty's feature parser. After ss01 that parser skips the spaces, and when it hits # it gives up on that feature. It logs a warning, "failed to parse font feature setting", and doesn't add it. The ss02 line fails the same way, so neither alternate turns on. Anyone who pasted that snippet got the default letters, with nothing on screen to say why. This part comes from the source, and neither the agent nor I have watched it in a live window yet.

Moving the comments up a line fixes it:
# zero with a vertical bar
font-feature = ss01
With that version +show-config prints a clean font-feature = ss01. The public README has used that version since 14 November.
Don't lean on +show-config for this, by the way. It repeats the stored text, so font-feature = totally-not-a-feature looks as clean as ss01, and +validate-config passes it too. You'd only see the failure in Ghostty's log.