adding a wttr.in alias/function

This commit is contained in:
Conner McCall 2020-06-09 14:30:35 -05:00
parent a5ec18f72e
commit 8d04c30392

View file

@ -15,3 +15,11 @@ HISTFILESIZE=15000
test -e "${HOME}/.iterm2_shell_integration.bash" && source "${HOME}/.iterm2_shell_integration.bash"
wttr()
{
# change Paris to your default location
local request="wttr.in/${1-St+Paul+MN}"
[ "$(tput cols)" -lt 125 ] && request+='?n'
curl -H "Accept-Language: ${LANG%_*}" --compressed "$request"
}