fix(zsh prompt): _get_time miscalculation
This commit is contained in:
parent
3fe43f80b3
commit
10ca6d2791
@ -1,6 +1,6 @@
|
||||
autoload -Uz vcs_info colors && colors
|
||||
|
||||
export VIRTUAL_ENV_DISABLE_PROMPT=1
|
||||
VIRTUAL_ENV_DISABLE_PROMPT=1
|
||||
|
||||
export GROFF_NO_SGR=1
|
||||
export LESS_TERMCAP_mb="${fg_bold[red]}"
|
||||
@ -42,10 +42,11 @@ function _get_time() {
|
||||
local text
|
||||
|
||||
text="$((d % 60))s"
|
||||
if [ "$d" -gt 60 ]; then
|
||||
if [ "$d" -ge 60 ]; then
|
||||
(( d /= 60 ))
|
||||
text="$((d % 60))m$text"
|
||||
if [ "$d" -gt 60 ]; then
|
||||
if [ "$d" -ge 60 ]; then
|
||||
(( d /= 60 ))
|
||||
text="${d}h$text"
|
||||
fi
|
||||
fi
|
||||
|
Loading…
Reference in New Issue
Block a user