3 ms·
> I show the duration of the command in a human readable format, but only if the command too more than 60 seconds There is also a similar builtin feature [1] o
by nikeee 6y ago
> I show the duration of the command in a human readable format, but only if the command too more than 60 seconds
There is also a similar builtin feature [1] of ZSH. For example, you can put this in your .zshrc:
REPORTTIME=10
It instructs ZSH to report the time elapsed since the command was invoked (if it is above this threshold, 10 seconds in this case).
However, it just takes the CPU time into account. When using something like `sleep`, it won't trigger. There is a plugin [2] that covers this use case aswell.
[1]: https://nuclearsquid.com/writings/reporttime-in-zsh/ https://nuclearsquid.com/writings/reporttime-in-zsh/
[2]: https://github.com/popstas/zsh-command-time https://github.com/popstas/zsh-command-time
- naggie 6y agoHm, I didn't know about that. Thanks. Though, I use bash mostly.