no version change, just added wrapper around tput cols so only use it if in terminal

This commit is contained in:
inxi-svn 2014-03-15 17:56:51 +00:00
parent 4ae6833512
commit 7f7cdba90c

2
inxi
View file

@ -491,7 +491,7 @@ if [[ -n $( type -p tput ) ]];then
COLUMNS=$(tput cols)
fi
# double check, just in case it's missing functionality or whatever
if [[ -z $( grep -E '^[0-9]+$' <<< $COLUMNS ) ]];then
if [[ -z ${COLUMNS##[0-9]*} ]];then
LINES=100
COLUMNS=80
fi