XDG Base Directory Specification adherence #117
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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. 😀