gabriel / muse public
fix omzsh-plugin main #96 / 100

fix(omzsh-plugin): require repo.json for repo detection, pre-clear state on chpwd

_muse_find_root previously accepted any .muse/ directory as a valid repo, causing false positives from stray or partial .muse/ directories in ancestor paths. Now requires .muse/repo.json to exist — the canonical marker of a properly initialised Muse repo.

_muse_hook_chpwd now pre-clears MUSE_REPO_ROOT and MUSE_BRANCH before calling _muse_refresh, so any silent failure in refresh leaves the prompt blank rather than showing stale state from the previous directory.

Adds muse_debug() for in-shell diagnosis when the prompt looks wrong.

G Gabriel Cardona <gabriel@tellurstori.com> · 3d ago Mar 21, 2026 · 5e504f28 · parent 5f930fbb
1
file changed
342
files in snapshot
Files Changed 342 in snapshot
~1

0 comments

No comments yet. Be the first to start the discussion.