diff options
author | Ulrich Müller <ulm@gentoo.org> | 2013-11-10 19:25:56 +0100 |
---|---|---|
committer | Ulrich Müller <ulm@gentoo.org> | 2013-11-10 19:25:56 +0100 |
commit | 26c49888ff5c503a1149719f87cb3f4a3f941a50 (patch) | |
tree | 6663de1d3425a45f1f52d381716eb7836f34e859 /libs | |
parent | Cosmetic changes in output.bash. (diff) | |
download | eselect-26c49888ff5c503a1149719f87cb3f4a3f941a50.tar.gz eselect-26c49888ff5c503a1149719f87cb3f4a3f941a50.tar.bz2 eselect-26c49888ff5c503a1149719f87cb3f4a3f941a50.zip |
Implement space function more efficiently.
* libs/output.bash.in (space): Implement more efficiently.
Diffstat (limited to 'libs')
-rw-r--r-- | libs/output.bash.in | 7 |
1 files changed, 3 insertions, 4 deletions
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}" } |