From 0468b2d918e5c5e880d509205676d15ffae90e05 Mon Sep 17 00:00:00 2001 From: BarbUk Date: Wed, 9 Mar 2022 21:04:54 +0100 Subject: [PATCH] Use printf variable scope --- lib/command_duration.bash | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/command_duration.bash b/lib/command_duration.bash index ffa6d5f1..aaccb48b 100644 --- a/lib/command_duration.bash +++ b/lib/command_duration.bash @@ -14,7 +14,7 @@ function _dynamic_clock_icon { local clock_hand # clock hand value is between 90 and 9b in hexadecimal. # so between 144 and 155 in base 10. - clock_hand=$(printf '%x' $(((${1:-${SECONDS}} % 12) + 144))) + printf -v clock_hand '%x' $(( (${1:-${SECONDS}} % 12) + 144 )) printf -v 'COMMAND_DURATION_ICON' '%b' "\xf0\x9f\x95\x$clock_hand" }