macOS dotfiles should not go in –/Library/Application Support
Where macOS CLI/TUI configs “should” live
- One camp: CLI/TUI tools are part of the Unix side of macOS and should follow XDG: default to
~/.config/yourtool, respectXDG_*vars, keep$HOMEclean. - Another camp: Apple’s documented “standard directories” put per-user app data under
~/Library/Application Support/<identifier>; using that on macOS is “technically correct” and consistent with Go, Python, and some Rust libraries. - A third view: configs are “preferences” and belong in
~/Library/Preferencesvia CFPreferences/NSUserDefaults, especially if you want profiles and thedefaultsCLI, but others argue Apple explicitly says not to write arbitrary files there and that plist‑based workflows are hostile for hand‑edited configs. - Several people suggest a compromise: store in
~/.configand symlink that directory into~/Library/Application Support/...so both expectations work.
Does the XDG spec apply to macOS?
- Some argue XDG is a freedesktop/Linux desktop spec, not an OS‑agnostic or Open Group standard; macOS already has its own conventions, so XDG defaults shouldn’t override them.
- Others counter that macOS is Unix, XDG makes no explicit carve‑outs, and many cross‑platform CLI tools (git, vim, etc.) already support XDG; at minimum, if
XDG_*env vars are set they should be honored on macOS. - There’s debate over adding a separate “opt into XDG” flag vs treating the presence of
XDG_*as implicit opt‑in. - Some criticize the XDG text as imprecise, especially the line between
XDG_CONFIG_HOME,XDG_DATA_HOME, andXDG_STATE_HOME; others quote the spec to argue it’s clear enough in practice.
Language and library ecosystem debates
- The Rust
dirscrate is a flashpoint: it chooses Application Support on macOS. Some see that as correct adherence to Apple docs; others want XDG or at least XDG‑aware behavior. Alternatives likeetceteraor direct use ofxdgon non‑Windows are mentioned. - Concerns are raised about changing default paths breaking existing installs; suggested mitigations include dual‑path lookup without automatic migration.
- Broader side threads cover dependency bloat (Rust vs Go), how often libraries respect OS conventions on Windows/macOS, and whether repeated user pressure on maintainers is “pestering” or legitimate feedback.
User expectations and ergonomics
- Multi‑OS Unix users value a single XDG layout for dotfile syncing; some long‑time Mac users find
~/.config“Linux‑ish” and expect Library‑based locations. - Several people emphasize “least surprise”: follow platform norms for GUI apps, but keep CLI configs text‑based, easily editable, diffable, and not buried in plist or opaque locations.