1
0
Fork 0
mirror of https://github.com/romkatv/powerlevel10k.git synced 2024-11-16 09:50:06 +00:00

when command_execution_time is a single integer, add 's' suffix to it

Inspired by https://github.com/bhilburn/powerlevel9k/pull/1215.
This commit is contained in:
romkatv 2019-06-20 18:15:10 +02:00
parent 0849e831f5
commit 9039864a68

View file

@ -677,7 +677,8 @@ prompt_command_execution_time() {
if (( _P9K_COMMAND_DURATION < 60 )); then
if [[ $POWERLEVEL9K_COMMAND_EXECUTION_TIME_PRECISION == 0 ]]; then
local -i text=_P9K_COMMAND_DURATION
local -i sec=_P9K_COMMAND_DURATION
local text=${sec}s
else
local -F $POWERLEVEL9K_COMMAND_EXECUTION_TIME_PRECISION text=_P9K_COMMAND_DURATION
fi