From 713535277bc15b4156b02d5b4efd5156cfefe7c2 Mon Sep 17 00:00:00 2001 From: inxi-svn Date: Thu, 3 Apr 2014 05:11:36 +0000 Subject: [PATCH] fixed a small bug in 2.1.16 that broke irc line counter --- inxi | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/inxi b/inxi index a705229..77e9f0a 100755 --- a/inxi +++ b/inxi @@ -8915,8 +8915,8 @@ calculate_line_length() { local string=$1 # ansi:  irc: \x0312 - # note: using special trick for bsd sed, tr - string=$( sed -e 's/'$ESC'\[[0-9]\{1,2\}\(;[0-9]\{1,2\}\)\{0,2\}m//g' -e 's/\\\x0[0-9]\{1,3\}//g' <<< $string ) + # note: using special trick for bsd sed, tr - NOTE irc sed must use " double quote + string=$( sed -e 's/'$ESC'\[[0-9]\{1,2\}\(;[0-9]\{1,2\}\)\{0,2\}m//g' -e "s/\\\x0[0-9]\{1,3\}//g" <<< $string ) count=${#string} echo $count } @@ -9735,7 +9735,6 @@ print_graphics_data() part_1_data="$display_server_string$driver_string" part_2_data="${C1}$res_tty$SEP3${C2} $screen_resolution $root_x_string" - if [[ -n $( grep -vE '^[[:space:]]*$' <<< $part_1_data$part_2_data ) && \ $( calculate_line_length "$part_1_data $part_2_data" ) -gt $COLS_INNER ]];then graphics_data=$( create_print_line "$line_starter" "$part_1_data" )