From d11ba705fe86f7bf49636a22bd2ae30be292cb66 Mon Sep 17 00:00:00 2001 From: Matteo Cypriani Date: Wed, 20 Jan 2010 15:53:23 +0100 Subject: [PATCH] [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). --- email_account/email_account | 1 + 1 file changed, 1 insertion(+) diff --git a/email_account/email_account b/email_account/email_account index b329689..db4af0e 100755 --- a/email_account/email_account +++ b/email_account/email_account @@ -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