- Jan
- 617
- 15
Using @timediff in Charles Dye's ISO8601 plugin combined with the PRE_EXEC alias, I've created a permanent command line timer on my PROMPT (which uses ANSI codes) that shows the duration of the previously executed command.
Code:
alias PRE_EXEC=`set STARTTIME=%_TIME`
PROMPT=`$e[35;2m%@timediff[%STARTTIME,%_TIME]$e[0m$_$e[32;2m[$P]$_$e[35;1m$t$s$$$e[0m$s`