Skip to content
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

XDG Base Directory Specification adherence #117

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

elerch
Copy link

@elerch elerch commented Jan 19, 2025

This change alters the default behavior for zvm to adhere to the typical XDG specification. Windows and Mac are untouched, but the groundwork has been laid to allow a more native experience on those OSs.

Having consistent behavior across all operating systems is highlighted in the project at the moment, so I understand if you may not be interested in this PR. However, I think this project does a great job, but the program behaves differently from anything else on my system under linux.

With this PR, if you set the ZVM_PATH, behavior is identical to today. If you do not, all XDG_* variables will be honored, along with their defaults.

Symlinks to zvm, zig, and zls in ~/.local/bin
Config in ~/.config/zvm
Cache in ~/.cache/zvm
Data (currently just zvm binary itself) in ~/.local/zvm/share
State (zig and zls downloads) in ~/.local/zvm/state

I have not updated the installer, and I am happy to hear any suggestions you may have. Also willing to build out the Mac/Windows conventions, but I didn't need it and I wanted to know if you were interested in this first. 😀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant