slitaz-base-files rev 328

libtaz.sh: get_cols(): allow > 80 cols.
author Aleksej Bobylev <al.bobylev@gmail.com>
date Wed Mar 01 13:07:13 2017 +0200 (2017-03-01)
parents 4cb0e4cf962e
children 8d2d656745d7
files rootfs/lib/libtaz.sh
line diff
     1.1 --- a/rootfs/lib/libtaz.sh	Tue Feb 28 15:08:28 2017 +0100
     1.2 +++ b/rootfs/lib/libtaz.sh	Wed Mar 01 13:07:13 2017 +0200
     1.3 @@ -45,12 +45,7 @@
     1.4  _p() { local S="$1" P="$2" N="$3"; shift 3; printf "$(ngettext "$S" "$P" "$N")" "$@"; }
     1.5  
     1.6  # Get terminal columns
     1.7 -get_cols() { 
     1.8 -	#stty size 2>/dev/null | awk -vc=$cols 'END{print c?c:($2 && $2<80)?$2:80}';
     1.9 -	if ! stty size | cut -d " " -f 2; then
    1.10 -		echo 80
    1.11 -	fi
    1.12 -}
    1.13 +get_cols() { stty size 2>/dev/null | awk -vc=$cols 'END{print c?c:$2?$2:80}'; }
    1.14  
    1.15  # Last command status
    1.16  status() {