some small indentation fixes

This commit is contained in:
inxi-svn 2014-03-14 02:51:56 +00:00
parent 6dfa2422ce
commit 2734a2746b

12
inxi
View file

@ -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" )"