From 2734a2746bb2fd79c20603307c3e2fb57827c796 Mon Sep 17 00:00:00 2001 From: inxi-svn Date: Fri, 14 Mar 2014 02:51:56 +0000 Subject: [PATCH] some small indentation fixes --- inxi | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/inxi b/inxi index 568a522..46a6d71 100755 --- a/inxi +++ b/inxi @@ -2620,7 +2620,7 @@ print_lines_basic() local line_width=$LINE_MAX_BASIC local line_starter=$2 local print_string='' indent_inner='' indent_full='' indent_x='' - local indent_working='' + local indent_working='' indent_working_full='' local line_starter='' line_1_starter='' line_x_starter='' # note: to create a padded string below local fake_string=' ' temp_count='' line_count='' spacer='' @@ -2653,10 +2653,12 @@ print_lines_basic() 2) indent_full=$(( $indent_main + 6 )) indent_inner=3 temp_count=${#2} - if [[ $temp_count -lt $indent_inner ]];then + if [[ $temp_count -le $indent_inner ]];then indent_working=$indent_inner + #indent_working_full=$indent_full else - indent_working=$temp_count #$(( $temp_count + 1 )) + indent_working=$(( $temp_count + 1 )) + #indent_working_full=$(( $indent_full - $indent_inner - 1 )) fi line_1_starter="$( sed -e :a -e "s/^.\{1,$indent_working\}$/& /;ta" <<< $2 )" line_1_starter="$( sed -e :a -e "s/^.\{1,$indent_full\}$/ &/;ta" <<< "$line_1_starter" )" @@ -2664,10 +2666,10 @@ print_lines_basic() 3) indent_full=$(( $indent_main + 8 )) indent_inner=3 temp_count=${#2} - if [[ $temp_count -lt $indent_inner ]];then + if [[ $temp_count -le $indent_inner ]];then indent_working=$indent_inner else - indent_working=$temp_count #$(( $temp_count + 1 )) + indent_working=$(( $temp_count + 1 )) fi line_1_starter="$( sed -e :a -e "s/^.\{1,$indent_working\}$/& /;ta" <<< $2 )" line_1_starter="$( sed -e :a -e "s/^.\{1,$indent_full\}$/ &/;ta" <<< "$line_1_starter" )"