@mpy 's comment was correct. So I'm rephrasing my question. I really like REPORTTIME feature in zsh, but it only reports time when user+system time is greater than $REPORTTIME according to zsh doc. Is there a way to make zsh report time when wall time is greater than some number, but not report time when wall time is below that number?
Original Question: I really like REPORTTIME feature in zsh, but according to the zsh doc, it will only output when command result is nonzero. But there are some cases when some command takes a while and fails, and I want to know how long it took. Does anyone know a way to print out time for the command even if the result failed?
REPORTTIME
If nonnegative,...") refers to$REPORTTIME
itself, not the return status of the command. Note, that the user+system time must be greater than$REPORTTIME
, not the wall time. Sosleep 2
doesn't report a statistics even withREPORTTIME=1