zlacker

[return to "Understanding the bin, sbin, usr/bin, usr/sbin split (2010)"]
1. bjourn+6f[view] [source] 2022-05-11 08:38:10
>>taubek+(OP)
Roughly the same reason why dotfiles became a thing on Unix: https://linux-audit.com/linux-history-how-dot-files-became-h... Fortunately more and more software is putting its config in ~/.config/ rather than dumping it all over users' home directories.
◧◩
2. sph+Xg[view] [source] 2022-05-11 08:57:59
>>bjourn+6f
AFAIK the XDG spec isn't a thing on macOS, so you get those CLI utilities written by devs on their fancy Macbook Pro that pollute your home directory, such as Deno, Doom Emacs, Elixir, Rust/Cargo, Kubernetes, npm, vscode, etc.
◧◩◪
3. faho+kJ[view] [source] 2022-05-11 12:51:33
>>sph+Xg
There is no specific reason for a program that uses the XDG dirs on other unices to not use them on macOS, other than some idea that it's "alien".

You can have ~/.config/. Nothing in macOS prevents you from having it. And so, some programs do. The worst thing that happens is that, instead of having one directoy ~/.foo you now have one directory ~/.config/foo and nothing else in ~/.config. But as soon as you add the second thing that uses ~/.config, you now have two directories in there instead of a second dotdirectory in ~.

It's just that for a bunch of them the XDG path is only used if it exists - e.g. emacs predates the spec, so it uses ~/.emacs.d (and a few others) first.

Cargo doesn't use the XDG paths at all, apparently - https://github.com/rust-lang/cargo/issues/1734. However it also needs a directory for binaries (~/.cargo/bin) and ~/.local/bin isn't actually in the spec at the moment (https://gitlab.freedesktop.org/xdg/xdg-specs/-/issues/14).

[go to top]