Weather function inside the Terminal

Want to check the weather report directly from your terminal? Simply add the following to your .bashrc or .zshrc file:

# Check the weather
weather() {
  curl http://wttr.in/$1
}

Source or restart your terminal and then all you need to do is type weather followed by any location. For example:

❯ weather nyc

How cool is that!!? I found this works with postcodes as well, although not everywhere i guess.
And if you browse to http://wttr.in, you will probably get your local weather report. Just like simply typing weather

Buy Me A Coffee