Use printf variable scope

pull/2120/head
BarbUk 2022-03-09 21:04:54 +01:00
parent 4b857925f7
commit 0468b2d918
No known key found for this signature in database
GPG Key ID: DB301C759539E9FE
1 changed files with 1 additions and 1 deletions

View File

@ -14,7 +14,7 @@ function _dynamic_clock_icon {
local clock_hand local clock_hand
# clock hand value is between 90 and 9b in hexadecimal. # clock hand value is between 90 and 9b in hexadecimal.
# so between 144 and 155 in base 10. # 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" printf -v 'COMMAND_DURATION_ICON' '%b' "\xf0\x9f\x95\x$clock_hand"
} }