Update meteo function

This commit is contained in:
Jeremy Gardais 2022-07-20 17:26:41 +02:00
parent 2649735362
commit c492d0a718
Signed by: jegardai
GPG Key ID: E759BAA22501AF32
1 changed files with 9 additions and 1 deletions

10
zshrc
View File

@ -1101,7 +1101,15 @@ function debcplay() {
# }}}
# Web apps {{{
# Get weather
alias meteo="curl http://fr.wttr.in/"
function meteo {
if command -v curl > /dev/null; then
curl http://fr.wttr.in/${*}
elif command -v wget > /dev/null; then
wget -qO- http://wttr.in/${*}
else
printf '%b' "Please ${REDB}install one of this tools :${RESET} curl or wget.\n"
fi
}
# }}}
#######################################