diff options
author | romkatv <roman.perepelitsa@gmail.com> | 2019-06-20 19:15:10 +0300 |
---|---|---|
committer | romkatv <roman.perepelitsa@gmail.com> | 2019-06-20 19:15:10 +0300 |
commit | 9039864a68946cf7483c883c8e60330f149944fc (patch) | |
tree | c76e4da298a2c0665086d03ee7225afa08b01b0e /internal | |
parent | 0849e831f556866bf4983ed20e75f33b794b942b (diff) |
when command_execution_time is a single integer, add 's' suffix to it
Inspired by https://github.com/bhilburn/powerlevel9k/pull/1215.
Diffstat (limited to 'internal')
-rwxr-xr-x | internal/p10k.zsh | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/internal/p10k.zsh b/internal/p10k.zsh index 8c7bc45c..f6f01e1d 100755 --- a/internal/p10k.zsh +++ b/internal/p10k.zsh @@ -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 |