[email_account] Min. nb_tabs in echo_with_tabs()

In echo_with_tabs(), set the number of printed tabs to 1 if it is
evaluated to less than 1 (typically if the third parameter is too small
comparatively to the text length).
This commit is contained in:
Matteo Cypriani 2010-01-20 15:53:23 +01:00
parent 0361541657
commit d11ba705fe
1 changed files with 1 additions and 0 deletions

View File

@ -233,6 +233,7 @@ echo_with_tabs ()
local - nbchars nbtabs
nbchars=$(echo "$1" | wc -m)
nbtabs=$(($3-nbchars/8))
[ $nbtabs -lt 1 ] && nbtabs=1
echo -n "$1"
for i in $(seq $nbtabs)
do