-
Notifications
You must be signed in to change notification settings - Fork 36
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add support for the XDG Base Directory Specification #104
Comments
Thanks for the suggestion. It's worth considering for a future revision of the metadata. My major concern with relying on XDG is that it isn't portable to systems that don't implement XDG. Splitting multirust's data into multiple directory also loses the simplicity of being able to override |
I wouldn't be against making this an opt in feature for the people who do want it. Perhaps have a file or configuration key for indicating that the user has opted in to using the XDG spec? EDIT: Or maybe use an environment variable? (Something like: |
Yes, it seems like it would need to be optional. |
How about defaulting to XDG if ~/.config/multirust is present? |
@jck why would that be a more desirable way to activate XDG than |
Because people usually just symlink folders from their dotfiles repo to XDG_CONFIG_HOME. This way, they don't have to set an additional environment variable. |
How about checking if |
@nodakai I'd prefer that, but I'm still not convinced it's the right thing to do. If multirust supports XDG we also need to care about where cargo is putting its data, and right now they are not planning on adding XDG I think. |
I recommend storing:
~/.multirust/toolchains
under$XDG_DATA_HOME/multirust
.~/.multirust/default
,~/.multirust/overrides
and~/.multirust/version
under$XDG_CONFIG_HOME/multirust
.~/.multirust/cache
and~/.multirust/update-hashes
under$XDG_CACHE_HOME/multirust
.You can find the specification here.
This blog post lists the advantages of using the XDG Base Directory Specification as follows:
$HOME
is a lot less cluttered.$XDG_DATA_HOME
along with your files is enough).The text was updated successfully, but these errors were encountered: