commit 59597bcd28537945ca747b777939e92d3a2e1321 parent 4e78c074dbbe06b194381132780d75541514a210 Author: finwo <finwo@pm.me> Date: Wed, 9 Nov 2022 13:04:53 +0100 Auto-install nvm on new systems when using the command Diffstat:
| M | zsh/home/.zshrc | | | 4 | ++++ |
1 file changed, 4 insertions(+), 0 deletions(-)
diff --git a/zsh/home/.zshrc b/zsh/home/.zshrc @@ -231,6 +231,10 @@ fi # Load on-demand nvm() { + if [ ! -d "$HOME/.nvm" ]; then + echo 'Installing NVM...' + curl -o- "https://raw.githubusercontent.com/nvm-sh/nvm/$(version nvm-sh/nvm)/install.sh" | bash + fi echo 'Loading NVM...' unset -f nvm export NVM_DIR="$HOME/.nvm"