diff --git a/zshrc b/zshrc index 682a031..958b64c 100644 --- a/zshrc +++ b/zshrc @@ -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 +} # }}} #######################################