feat(config): introduce __fish_user_dots_path universal variable #63

Merged
rootiest merged 1 commits from feat/user-dots-path-variable into main 2026-06-23 15:34:06 +00:00
Owner

Summary

  • Introduces __fish_user_dots_path universal variable so users can point the private overlay directory at any path via set -U __fish_user_dots_path /your/path, rather than being locked to ~/.config/.user-dots/fish/
  • Simplifies sourcing model: config.fish now sources only local.fish; local.fish is responsible for sourcing its own secrets.fish companion (removes redundant double-sourcing)
  • Updates docs/fish-config.md Sections 1, 7, and 10 to document the new variable and sourcing model
  • Updates README.md Personalization section and "How it works" code example

Files Changed

File Change
config.fish Replace hardcoded dot_fish local + secrets.fish source with set -q __fish_user_dots_path fallback; source only local.fish
docs/fish-config.md Document __fish_user_dots_path in Sections 1, 7, 10; update path references and sourcing model description
README.md Update Personalization intro, directory tree, and "How it works" code block

Manual Verification

  • Open a new Fish shell — confirm no errors on startup
  • Confirm local.fish is still sourced from the default path (~/.config/.user-dots/fish/local.fish) when __fish_user_dots_path is not set
  • Run set -U __fish_user_dots_path /tmp/test-dots and create /tmp/test-dots/local.fish with set -gx DOTS_PATH_TEST ok; open a new shell and confirm echo $DOTS_PATH_TEST prints ok
  • Confirm secrets.fish is no longer sourced directly by config.fish (it is now sourced inside local.fish)
  • Run set -e __fish_user_dots_path to restore default; open new shell — confirm normal operation resumes
## Summary - Introduces `__fish_user_dots_path` universal variable so users can point the private overlay directory at any path via `set -U __fish_user_dots_path /your/path`, rather than being locked to `~/.config/.user-dots/fish/` - Simplifies sourcing model: `config.fish` now sources only `local.fish`; `local.fish` is responsible for sourcing its own `secrets.fish` companion (removes redundant double-sourcing) - Updates `docs/fish-config.md` Sections 1, 7, and 10 to document the new variable and sourcing model - Updates `README.md` Personalization section and "How it works" code example ## Files Changed | File | Change | |---|---| | `config.fish` | Replace hardcoded `dot_fish` local + `secrets.fish` source with `set -q __fish_user_dots_path` fallback; source only `local.fish` | | `docs/fish-config.md` | Document `__fish_user_dots_path` in Sections 1, 7, 10; update path references and sourcing model description | | `README.md` | Update Personalization intro, directory tree, and "How it works" code block | ## Manual Verification - [x] Open a new Fish shell — confirm no errors on startup - [x] Confirm `local.fish` is still sourced from the default path (`~/.config/.user-dots/fish/local.fish`) when `__fish_user_dots_path` is not set - [x] Run `set -U __fish_user_dots_path /tmp/test-dots` and create `/tmp/test-dots/local.fish` with `set -gx DOTS_PATH_TEST ok`; open a new shell and confirm `echo $DOTS_PATH_TEST` prints `ok` - [x] Confirm `secrets.fish` is no longer sourced directly by `config.fish` (it is now sourced inside `local.fish`) - [x] Run `set -e __fish_user_dots_path` to restore default; open new shell — confirm normal operation resumes
rootiest added 1 commit 2026-06-23 07:21:35 +00:00
Allow users to customize the location of their private overlay directory
via `set -U __fish_user_dots_path /your/path`. Falls back to the previous
hardcoded default of `$XDG_CONFIG_HOME/.user-dots/fish` when unset.

Simplify the sourcing model: config.fish now sources only local.fish,
which is responsible for sourcing its own secrets.fish companion. The
redundant direct sourcing of secrets.fish from config.fish is removed.

Update docs/fish-config.md (Sections 1, 7, 10) and README.md to
document the new variable, the custom-path override pattern, and the
simplified sourcing model.
rootiest merged commit 47487ddcc0 into main 2026-06-23 15:34:06 +00:00
rootiest deleted branch feat/user-dots-path-variable 2026-06-23 15:34:07 +00:00
Sign in to join this conversation.