Landed
[Fix] `nvm_cd`: bypass a user-defined `cd` function
Landed as b1b3a00
`\cd` only bypasses aliases, so a user-defined `cd` function (eg, cdhist's) still ran, and broke `NVM_DIR` auto-detection when it rejected zsh's `-q`. Use `command cd`, which skips functions in POSIX shells. zsh's `command` runs `/usr/bin/cd` instead of the builtin, so use `builtin cd` there, as `nvm_echo` does for `printf`. `nvm_die_on_prefix` also now uses `nvm_cd` instead of a bare `cd`. Fixes #3835. See #3836.
authored by Jordan Harband · committed by the platform · parent 6dc3765 · Browse files · 2 files+31 added−2 removed