Fixed error in bash function

Replaced "$COLUMNS" with "$(tput cols)", because shell variables are not exported to child processes.
This commit is contained in:
Pierce Griffiths 2019-07-06 13:02:20 -05:00 committed by GitHub
parent a1517df21f
commit 9a59cc67bf
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -2,6 +2,6 @@ wttr()
{
# change Paris to your default location
local request="wttr.in/${1-Paris}"
[ "$COLUMNS" -lt 125 ] && request+='?n'
[ "$(tput cols)" -lt 125 ] && request+='?n'
curl -H "Accept-Language: ${LANG%_*}" --compressed "$request"
}