From 9a59cc67bfc441ea7d8b4a5524da63f42b8dd1e1 Mon Sep 17 00:00:00 2001 From: Pierce Griffiths Date: Sat, 6 Jul 2019 13:02:20 -0500 Subject: [PATCH] Fixed error in bash function Replaced "$COLUMNS" with "$(tput cols)", because shell variables are not exported to child processes. --- share/bash-function.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/share/bash-function.txt b/share/bash-function.txt index 56783e4..04bd227 100644 --- a/share/bash-function.txt +++ b/share/bash-function.txt @@ -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" }