diff options
-rw-r--r-- | ChangeLog | 4 | ||||
-rw-r--r-- | libs/output.bash.in | 7 |
2 files changed, 7 insertions, 4 deletions
@@ -1,3 +1,7 @@ +2013-11-10 Ulrich Müller <ulm@gentoo.org> + + * libs/output.bash.in (space): Implement more efficiently. + 2013-10-27 Ulrich Müller <ulm@gentoo.org> * autogen.bash: Update for aclocal 1.14. diff --git a/libs/output.bash.in b/libs/output.bash.in index ac934bb..78e0c4f 100644 --- a/libs/output.bash.in +++ b/libs/output.bash.in @@ -242,9 +242,8 @@ highlight_marker() { # space PUBLIC # Write $1 numbers of spaces space() { - local n ret="" - for (( n = 1; n <= $1; ++n )); do - ret="${ret} " + local n=$1 + while (( n-- > 0 )); do + echo -n " " done - echo -n "${ret}" } |