mirror of
https://github.com/smxi/inxi.git
synced 2025-01-31 10:02:18 +00:00
no version change, just added wrapper around tput cols so only use it if in terminal
This commit is contained in:
parent
4ae6833512
commit
7f7cdba90c
2
inxi
2
inxi
|
@ -491,7 +491,7 @@ if [[ -n $( type -p tput ) ]];then
|
||||||
COLUMNS=$(tput cols)
|
COLUMNS=$(tput cols)
|
||||||
fi
|
fi
|
||||||
# double check, just in case it's missing functionality or whatever
|
# 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
|
LINES=100
|
||||||
COLUMNS=80
|
COLUMNS=80
|
||||||
fi
|
fi
|
||||||
|
|
Loading…
Reference in a new issue