Changed long-running command time appearance.
This commit is contained in:
@@ -107,15 +107,15 @@ _adlee_format_elapsed_time() {
|
|||||||
local remainder=$((elapsed % 3600))
|
local remainder=$((elapsed % 3600))
|
||||||
local minutes=$((remainder / 60))
|
local minutes=$((remainder / 60))
|
||||||
local seconds=$((remainder % 60))
|
local seconds=$((remainder % 60))
|
||||||
print -P "${COLOR_RED}•─[ completed in: %b%B${COLOR_RED}${hours}h${minutes}m${seconds}s%b${COLOR_RED} at: %b%B${COLOR_RED}${timestamp}%b${COLOR_RED} ]─•%b"
|
print -P "${COLOR_RED}•••[ completed in: %b%B${COLOR_RED}${hours}h${minutes}m${seconds}s%b${COLOR_RED} at: %b%B${COLOR_RED}${timestamp}%b${COLOR_RED} ]•••%b"
|
||||||
elif [[ $elapsed -ge 60 ]]; then
|
elif [[ $elapsed -ge 60 ]]; then
|
||||||
# Minutes
|
# Minutes
|
||||||
local minutes=$((elapsed / 60))
|
local minutes=$((elapsed / 60))
|
||||||
local seconds=$((elapsed % 60))
|
local seconds=$((elapsed % 60))
|
||||||
print -P "${COLOR_ORANGE}•─[ completed in: %b%B${COLOR_LIGHT_ORANGE}${minutes}m${seconds}s%b${COLOR_ORANGE} at: %b%B${COLOR_LIGHT_ORANGE}${timestamp}%b${COLOR_ORANGE} ]─•%b"
|
print -P "${COLOR_ORANGE}••[ completed in: %b%B${COLOR_LIGHT_ORANGE}${minutes}m${seconds}s%b${COLOR_ORANGE} at: %b%B${COLOR_LIGHT_ORANGE}${timestamp}%b${COLOR_ORANGE} ]••%b"
|
||||||
else
|
else
|
||||||
# Seconds only
|
# Seconds only
|
||||||
print -P "${COLOR_LIGHT_GREEN}•─[ completed in: %b%B${COLOR_BRIGHT_GREEN}${elapsed}s%b${COLOR_BRIGHT_GREEN} at: %b%B${COLOR_LIGHT_GREEN}${timestamp}%b${COLOR_LIGHT_GREEN} ]─•%b"
|
print -P "${COLOR_LIGHT_GREEN}•[ completed in: %b%B${COLOR_BRIGHT_GREEN}${elapsed}s%b${COLOR_BRIGHT_GREEN} at: %b%B${COLOR_LIGHT_GREEN}${timestamp}%b${COLOR_LIGHT_GREEN} ]•%b"
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user