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.
1
file changed
343
files in snapshot
Files Changed
343 in snapshot
~1
No comments yet. Be the first to start the discussion.