adding a wttr.in alias/function
This commit is contained in:
parent
a5ec18f72e
commit
8d04c30392
1 changed files with 8 additions and 0 deletions
|
|
@ -15,3 +15,11 @@ HISTFILESIZE=15000
|
||||||
|
|
||||||
test -e "${HOME}/.iterm2_shell_integration.bash" && source "${HOME}/.iterm2_shell_integration.bash"
|
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"
|
||||||
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue