From 3080993da00f281c47a63b9b30258b991550e24f Mon Sep 17 00:00:00 2001 From: Luke Childs Date: Fri, 8 Jul 2016 13:42:00 +0100 Subject: [PATCH] Silently download file and return contents --- zsh-nvm.plugin.zsh | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/zsh-nvm.plugin.zsh b/zsh-nvm.plugin.zsh index dcb88d6..2b2afd2 100644 --- a/zsh-nvm.plugin.zsh +++ b/zsh-nvm.plugin.zsh @@ -1,3 +1,11 @@ _zsh_nvm_has() { type "$1" > /dev/null 2>&1 } + +_zsh_nvm_get() { + if _zsh_nvm_has "curl"; then + curl --silent "$1" + elif _zsh_nvm_has "wget"; then + wget --quiet --output-document - "$1" + fi +}