Display command duration in ZSH
Often I want to find out how long a shell command took to either benchmark it or figure out how expensive it would be to run it multiple times.
There already exists a ZSH plugin called timer that does this but I wanted to change the time format and make the text color more subtle. The screenshot below shows the result:
To install it clone the repo https://github.com/tom-auger/cmdtime into your
$ cd ~/.oh-my-zsh/custom/plugins $ git clone https://github.com/tom-auger/cmdtime
~/.zshrc and add to the list of plugins:
Finally reload your ZSH config to apply:
$ source ~/.zshrc