directory
directory copied to clipboard
XDG basedir spec 0.8
https://specifications.freedesktop.org/basedir-spec/basedir-spec-latest.html
It adds: There is a single base directory relative to which user-specific state data should be written. This directory is defined by the environment variable $XDG_STATE_HOME
.
It would be great that plural $XDG_CONFIG_DIRS
and $XDG_DATA_DIRS
were supported as well.
I really don't like how https://github.com/haskell/directory/issues/93 for XDG_RUNTIME_DIR
was resolved I'll comment there more.
Current status:
- [x] XDG_STATE_HOME (@athas, #680)
- [ ] XDG_CONFIG_DIRS and XDG_DATA_DIRS
- [ ]
~/.local/bin
(optional, https://github.com/haskell/directory/issues/119#issuecomment-882358023)
Spec v0.8 also introduced ~/.local/bin
. There just isn't an environment variable override for it.
It seems that they are slowly adopting Systemd's file-hierarchy(7)
, which already did define ~/.local/bin
. I'm guessing that they will adopt ~/.local/lib
too in the future.
I'd be happy to help with ~/.local/bin
, maybe as XdgBin
?
Regarding XDG_RUNTIME_DIR
, the usual default on UNIX-like systems is temp directory as it provides similar guarantees via sticky bit. See https://serverfault.com/questions/388840/good-default-for-xdg-runtime-dir.
XdgBin
sounds fine for ~/.local/bin
if there is a need for it.