Skip to content

Instantly share code, notes, and snippets.

# Based on oh-my-zsh gnzh theme
setopt prompt_subst
# Format command duration in a human readable way.
# For sub-second durations show increasing decimal precision until the value reaches 1.
_jezek_format_duration() {
local sec=${1:-0}
if (( sec < 0 )); then
sec=0