From 3634ea4a77d8f13c87acbfe45424e5b73a437066 Mon Sep 17 00:00:00 2001 From: Marc Beninca Date: Sat, 31 Aug 2024 00:55:03 +0200 Subject: [PATCH] fill --- spcd/bootstrap.sh | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/spcd/bootstrap.sh b/spcd/bootstrap.sh index c7a4f66..41aad1f 100644 --- a/spcd/bootstrap.sh +++ b/spcd/bootstrap.sh @@ -5,12 +5,11 @@ # ╰───╯ _spcd_fill() { - _spcd_fill__index=${1} - while [ "${_spcd_fill__index}" -gt 0 ]; do + local index=${1} + while [ "${index}" -gt 0 ]; do printf "%s" "${2}" - _spcd_fill__index=$((_spcd_fill__index - 1)) + index=$((index - 1)) done - unset _spcd_fill__index } # ╭───┬────────╮