3 ms·
If your binary is supposed to live in `/Applications`, by all means put its config in `~/Application Support`. If it lives in `/bin` or somewhere similar, or if
by pdpi 1y ago
If your binary is supposed to live in `/Applications`, by all means put its config in `~/Application Support`. If it lives in `/bin` or somewhere similar, or if its default or system-wide configuration go in `/etc`, config goes in `~/.config`.
- varenc 1y agoAgreed! but mostly moot. As a general rule, CLI utilities which are just single binaries should not go in /Applications. That folder is for app bundles which are folders with a .app extension, an Info.plist file, etc. And its not on the PATH used in the shell (by default). I think the exception is app bundles which also include some sort of auxiliary CLI utility that usually gets symlinked from its location in the /Application app bundle onto the PATH. For example the VSCode `code` CLI tool. Basically anything that's a pure CLI binary would never be in /Applications anyway.
- OJFord 1y agoIt's not moot though, because this whole thing is about the CLI binaries (usually because of a decision made by a framework like dirs-rs) using 'Application Support' et al.
- varenc 1y agoI meant to say that 'If your binary is supposed to live in `/Applications`, by all means put its config in `~/Application Support`' is moot because CLI binaries aren't in /Applications ever
- pdpi 1y agoThat's what I was hinting at. MacOS is kind of split into two personalities, and the way to be a good citizen in the system is to respect the boundaries between those two personalities. CLI tools are definitely part of the Unix personality and should follow its conventions.
- Hendrikto 1y agoI prefer https://uapi-group.org/specifications/specs/configuration_files_specification/ https://uapi-group.org/specifications/specs/configuration_fi... Defaults should go in /usr/. It is package developer / maintainer territory. System-wide overrides should go in /etc/. It is the purview of the system administrator. Importantly: > Programs must work correctly if no configuration files are found in /etc/. User-specific overrides should go in XDG_CONFIG_HOME, with a fallback to ~/.config/.
- blueflow 1y agouapi-group is systemd/linux specific and does not apply to MacOS or Windows.