Skip to content

Instantly share code, notes, and snippets.

@chrisyip
Created Mar 14, 2017
Embed
What would you like to do?
Zsh: auto run `nvm use` if `.nvmrc` exists
function auto_nvm () {
if command -v nvm >/dev/null && [[ -a .nvmrc ]]; then
nvm use
fi
}
chpwd_functions=(${chpwd_functions[@]} "auto_nvm")
auto_nvm
@vanduc1102
Copy link

vanduc1102 commented Mar 18, 2018

thanks man

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment