Skip to content

Show exec time after executing command

ref: https://www.reddit.com/r/fishshell/comments/4yyoi5/see_the_time_of_execution_after_the_end_of_a/

function printtime --on-event fish_postexec
        set duration (echo "$CMD_DURATION 1000" | awk '{printf "%.3fs", $1 / $2}')
        echo \t\($duration\)
end