Fix dynamic clock icon (#2120)
* Fix dynamic clock icon * Use printf variable scope * shfmt do not like spacespull/2122/head
parent
a6fd93076d
commit
e1ddf6e311
|
|
@ -11,7 +11,10 @@ function _command_duration_pre_exec() {
|
||||||
}
|
}
|
||||||
|
|
||||||
function _dynamic_clock_icon {
|
function _dynamic_clock_icon {
|
||||||
local -i clock_hand=$(((${1:-${SECONDS}} % 12) + 90))
|
local clock_hand
|
||||||
|
# clock hand value is between 90 and 9b in hexadecimal.
|
||||||
|
# so between 144 and 155 in base 10.
|
||||||
|
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"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue