From d18e623c38d85311a98231297c44ba33bf456c03 Mon Sep 17 00:00:00 2001 From: nojhan Date: Fri, 19 Aug 2022 12:21:27 +0200 Subject: [PATCH] fix(dotmatrix): optim loop Avoid subshells --- themes/dotmatrix/dotmatrix.theme | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/themes/dotmatrix/dotmatrix.theme b/themes/dotmatrix/dotmatrix.theme index 6a3b7fa..a6062a5 100644 --- a/themes/dotmatrix/dotmatrix.theme +++ b/themes/dotmatrix/dotmatrix.theme @@ -367,7 +367,11 @@ _lp_dotmatrix_theme_prompt() { head_width=0 fi - local spaced_side+=$(printf "%.0s " $(seq ${head_width})) + local spaced_side="" + local i + for ((i=0; i < head_width; i++)); do + spaced_side+=" " + done header+="${spaced_side}${side}"