gabriel / muse public
fix zsh-plugin main #78 / 100

fix(zsh-plugin): replace cd with env -C to stop chpwd recursion loop

ZSH fires chpwd_functions inside subshells ($(...)). The dirty check was doing $(cd "$MUSE_REPO_ROOT" && muse status --porcelain), which triggered _muse_hook_chpwd inside the subshell, which called _muse_refresh → _muse_check_dirty → $(cd ...) → infinite recursion until FUNCNEST limit.

Replace cd with env -C which changes the working directory at the OS level without invoking ZSH's cd builtin, so chpwd_functions never fires inside the subshell.

G Gabriel Cardona <gabriel@tellurstori.com> · 3d ago Mar 21, 2026 · 4f885bbe · parent 13c730d5
1
file changed
343
files in snapshot
Files Changed 343 in snapshot
~1

0 comments

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