mirror of https://github.com/chubin/wttr.in
Merge pull request #250 from Self-Perfection/patch-1
Handle narrow terminals in sample bash functionpull/254/head
commit
004da5fd3f
@ -1,5 +1,7 @@
|
||||
wttr()
|
||||
{
|
||||
# change Paris to your default location
|
||||
curl -H "Accept-Language: ${LANG%_*}" wttr.in/"${1:-Paris}"
|
||||
local request="wttr.in/${1-Paris}"
|
||||
[ "$COLUMNS" -lt 125 ] && request+='?n'
|
||||
curl -H "Accept-Language: ${LANG%_*}" --compressed "$request"
|
||||
}
|
||||
|
Loading…
Reference in new issue