Commit Graph
2 Commits
Author SHA1 Message Date
Willie 3b2f062cf0 docs: add v0.19.11 changelog, preserve_tilde_on_save docs, fix CI test
- Add changelog entry for v0.19.11 (preserve_tilde_on_save, backups gitignore)
- Document preserve_tilde_on_save in configuration reference, cross-machine sync, FAQ
- Fix TestFoldHomePath/unrelated-abs: use /opt/unrelated/foo instead of /tmp/foo (CI sets HOME=/tmp)
- Add iFwu to README contributors
2026-05-14 13:22:23 +08:00
iFwu 5403595120 feat(config): preserve ~ in saved config paths (opt-in)
Add PreserveTildeOnSave config flag (default false). When enabled, the
Save path folds $HOME prefixes back to ~ when serializing the in-memory
Config to YAML so the on-disk config stays portable across machines
(e.g. when shared via dotfiles).

The in-memory Config is left untouched; cloneForSave() produces a
shallow copy with path fields rewritten. Mirrors the existing
expandPath() calls performed in Load():
  - cfg.Source, cfg.ExtrasSource
  - cfg.Targets[*].Path / Skills.Path / Agents.Path
  - cfg.Extras[*].Source and Extras[*].Targets[*].Path

Adds:
  - utils.FoldHomePath() helper with unit tests (exact-home, child,
    sibling-non-home, unrelated-abs, relative, Windows case-insensitive)
  - 3 Save-path tests covering default-off, fold-on, and Load→Save
    idempotency.

Default off keeps the change backward compatible: existing users see no
behavior difference. Users who share their config via dotfiles can opt
in with:

    preserve_tilde_on_save: true
2026-05-14 13:09:56 +08:00