Skip to content

Support XDG_DATA_HOME for database location#37

Open
wyne wants to merge 3 commits into
mainfrom
feat/xdg-dirs
Open

Support XDG_DATA_HOME for database location#37
wyne wants to merge 3 commits into
mainfrom
feat/xdg-dirs

Conversation

@wyne

@wyne wyne commented Jun 10, 2026

Copy link
Copy Markdown
Owner

Summary

  • When XDG_DATA_HOME is set, fasder stores its database at $XDG_DATA_HOME/fasder/fasder instead of ~/.fasder
  • The XDG directory is created automatically if it doesn't exist (mode 0700)
  • Priority order: _FASDER_DATA > XDG_DATA_HOME > ~/.fasder (existing installs unaffected)

Closes #25

Test plan

  • XDG_DATA_HOME=/tmp/test fasder -l creates /tmp/test/fasder/ directory and uses /tmp/test/fasder/fasder as the database
  • Without XDG_DATA_HOME set, falls back to ~/.fasder as before
  • _FASDER_DATA still overrides everything when set
  • go test -run TestXDGDataHome ./... passes

https://claude.ai/code/session_015fMoaAdGN1KxxrVHskgicZ


Generated by Claude Code

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.

Support standard XDG dirs

2 participants