mirror of
https://github.com/lukechilds/zsh-nvm.git
synced 2025-01-30 09:47:14 +08:00
Silently download file and return contents
This commit is contained in:
parent
4b14302d6d
commit
3080993da0
@ -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
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user