(fix) fix the extra empty line printed

This commit is contained in:
b1ek 2024-02-22 01:09:36 +10:00
parent b4c9cb55d2
commit 098f3a0962
Signed by: blek
GPG Key ID: 14546221E3595D0C
1 changed files with 3 additions and 1 deletions

View File

@ -85,7 +85,9 @@ print_long_list() {
for el in ${list[@]}; do
printf '%s ' $el
if [ "$i" == "2" ]; then
printf '\n%s' "$(inf)$(inf)"
if ! [ "$(( "${#list[@]}" % 3 ))" == "0" ]; then
printf '\n%s' "$(inf)$(inf)"
fi
fi
i=$(( i + 1 ))
done