From 4f10e63798dceabfec9146d2d832bd9919fd13a4 Mon Sep 17 00:00:00 2001 From: Luke Childs Date: Fri, 8 Jul 2016 19:47:48 +0100 Subject: [PATCH] Add install script --- zsh-nvm.plugin.zsh | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/zsh-nvm.plugin.zsh b/zsh-nvm.plugin.zsh index 2b9a474..913bcbf 100644 --- a/zsh-nvm.plugin.zsh +++ b/zsh-nvm.plugin.zsh @@ -19,3 +19,9 @@ _zsh_nvm_latest_release_tag() { grep '"tag_name":' | # Get tag line sed -E 's/.*"([^"]+)".*/\1/' # Pluck JSON value } + +_zsh_nvm_install() { + git clone https://github.com/creationix/nvm.git "$NVM_DIR" + cd "$NVM_DIR" + git checkout --quiet "$(_zsh_nvm_latest_release_tag)" +}