How can the last command's wall time be put in the Bash prompt? -


Is there a way to embed the last command at the time of the wall in an indication? I'm expecting something that looks like this:

  [last: 0s] [/ my / dir] $ sleep 10 [last: from 10] [/ my / dir] $  

Background

I often run long data-crunching tasks and it is useful to know how long they took, so I I can estimate how much time it will take for future jobs for very routine tasks, I go ahead and this information is strictly appropriate logging technique I record using them. For less-formal tasks, I'll just complete the command with time

it will automatically time good for each single interactive command And will be printing information of time in some letters rather than three lines.

You can use this zsh borrowed hook to bash:

This hook was done over time (Mac OS X):


Comments

Popular posts from this blog

c# - How to capture HTTP packet with SharpPcap -

jquery - SimpleModal Confirm fails to submit form -

php - Multiple Select with Explode: only returns the word "Array" -