feat: migrate to XDG/FHS install locations#23
Merged
Conversation
50b8b72 to
db2ba0f
Compare
- Move config and state files to XDG base directories - Install binary to ~/.local/bin with migration from ~/.wt/bin - Add --system flag for system-wide installation - Update installation and configuration docs for XDG paths
db2ba0f to
1706a55
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Closes #21.
Summary
~/.wt/wt(shell alias) to~/.local/bin/wt(onPATH)~/.wt/config.tomlto$XDG_CONFIG_HOME/wt/config.toml(default~/.config/wt/)~/.wt/sessions.jsonto$XDG_STATE_HOME/wt/sessions.json(default~/.local/state/wt/)~/Library/Application Support/Changes
src/config.rs/src/session.rs: Hand-rolledxdg_config_home()/xdg_state_home()helpers (avoidsdirs::config_dir()/dirs::state_dir()which return Apple paths on macOS). Legacy~/.wt/paths are read as a fallback with a one-time stderr notice; writes always go to the new locations.install.sh: Installs to~/.local/bin/wtby default.--systemflag installs to/usr/local/bin/wt(withsudo). Alias-writing block removed entirely. Re-running the installer migrates legacy files, removes stale shell aliases from rc files, and cleans up~/.wt/if empty. Prints a one-line PATH instruction if the install dir is not on$PATH(macOS).README.md: Updated Installation and Configuration sections.Test plan
~/.wt/): binary at~/.local/bin/wt, nothing written under~/.wt/./install.sh --systeminstalls to/usr/local/bin/wt~/.config/wt/and~/.local/state/wt/~/.wt/removed, aliases stripped from rc files,which wtresolves to new pathXDG_CONFIG_HOME/XDG_STATE_HOMEenv vars honouredwtreads from~/.wt/with deprecation noticecargo testpasses (60 unit + integration tests including new XDG and legacy-fallback tests)