mirror of
https://github.com/ohmyzsh/ohmyzsh.git
synced 2025-12-05 01:46:46 +01: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:
parent
36cc94f3dc
commit
70a0577712
2 changed files with 7 additions and 3 deletions
|
|
@ -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" "$@"
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue