Repository navigation
Config docs don't match the load order in the code (config vs config.ghostty, and config-file) #14828
Replies: 1 comment 2 replies
|
Both observations are accurate—one is a documentation ordering mistake and the other is a genuine evaluation-order bug in 1.
|
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Issue Description
Two places where https://ghostty.org/docs/config doesn't match
src/config/Config.zig(1.3.1, same on main):Legacy
configandconfig.ghostty: the docs listconfig.ghosttyfirst and say files load "in the order above with conflicting values in later files overriding earlier ones", soconfigwould win.loadDefaultFilesloadsconfigfirst andconfig.ghosttysecond, soconfig.ghosttywins.config-fileincludes: the docs say they "are processed at the end of the current file", and that the macOS app support files load after the XDG ones.Config.loadloads every default file (XDG, then app support), then CLI args, and only then all includes (loadRecursiveFiles). So an include from the XDG file overrides the app support file, and CLI flags too.Either the docs or the code should change; I'm not sure which is intended.
(I used Claude Code to read the source and run the checks.)
Expected Behavior
As the docs describe: with both files present,
configoverridesconfig.ghostty; and on macOS,~/Library/Application Support/com.mitchellh.ghostty/config.ghosttyoverrides the XDG file, including what the XDG file pulls in withconfig-file. And CLI flags override config files.Actual Behavior
config.ghosttyoverridesconfig, and a file included withconfig-filefrom the XDG config overrides the app support config and CLI flags.Reproduction Steps
Linux or macOS: put
font-size = 11in$XDG_CONFIG_HOME/ghostty/configandfont-size = 22in$XDG_CONFIG_HOME/ghostty/config.ghostty.ghostty +show-configprintsfont-size = 22.macOS: put
config-file = extrain~/.config/ghostty/config.ghostty,font-size = 14in~/.config/ghostty/extra, andfont-size = 12in~/Library/Application Support/com.mitchellh.ghostty/config.ghostty.ghostty +show-configprintsfont-size = 14.Linux: put
config-file = extrain$XDG_CONFIG_HOME/ghostty/config.ghosttyandfont-size = 8in$XDG_CONFIG_HOME/ghostty/extra, then runghostty --gtk-single-instance=false --font-size=30(so it doesn't reuse a running instance). The window opens at size 8. Withextraat 30 and--font-size=8, it opens at 30.Ghostty Logs
No response
Ghostty Version
OS Version Information
macOS 27.0.1 (26A434); steps 1 and 3 on Arch Linux, Ghostty 1.3.1-arch2
(Linux only) Display Server
Wayland
(Linux only) Desktop Environment/Window Manager
GNOME
Minimal Ghostty Configuration
Additional Relevant Configuration
No response
I acknowledge that:
```) on separate lines.All reactions