mirror of
https://gitee.com/mirrors/ohmyzsh.git
synced 2026-10-13 10:04:22 +08:00
feat(nvm): introduce customizable list of command that triggers lazy loading (#9946)
* Add customizable list of command that triggers lazy loading * Add $NVM_LAZY_CMD * Add instruction to `NVM_LAZY_CMD` in README.md
This commit is contained in:
1 parent
36cc94f3dc
commit
70a0577712
2 files changed
+7
-3
No files matched your search
@@ -28,8 +28,8 @@ fi
|
||||
|
||||
# Call nvm when first using node, npm or yarn
|
||||
if (( $+NVM_LAZY )); then
|
||||
function node npm yarn {
|
||||
unfunction node npm yarn
|
||||
function node npm yarn $NVM_LAZY_CMD {
|
||||
unfunction node npm yarn $NVM_LAZY_CMD
|
||||
nvm use default
|
||||
command "$0" "$@"
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user