zsh-nvm/zsh-nvm.plugin.zsh
2016-07-08 13:42:00 +01:00

12 lines
202 B
Bash

_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
}