[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:
parent
0361541657
commit
d11ba705fe
|
@ -233,6 +233,7 @@ echo_with_tabs ()
|
||||||
local - nbchars nbtabs
|
local - nbchars nbtabs
|
||||||
nbchars=$(echo "$1" | wc -m)
|
nbchars=$(echo "$1" | wc -m)
|
||||||
nbtabs=$(($3-nbchars/8))
|
nbtabs=$(($3-nbchars/8))
|
||||||
|
[ $nbtabs -lt 1 ] && nbtabs=1
|
||||||
echo -n "$1"
|
echo -n "$1"
|
||||||
for i in $(seq $nbtabs)
|
for i in $(seq $nbtabs)
|
||||||
do
|
do
|
||||||
|
|
Loading…
Reference in New Issue