Quantcast
Channel: Active questions tagged fish - Stack Overflow
Viewing all articles
Browse latest Browse all 127

View time taken of last command in fish shell

$
0
0

I'm aware that I can use time as

time <some command>

But this requires me to remember to type time before <some command>

I'm wondering if it's possible create some sort of hook, so that time is run for every command, but only displayed if I enter last-time or something at the cli.

An example usage might be:

$ sleep 2$ last-time________________________________________________________Executed in    2.00 secs      fish           external   usr time    2.28 millis  912.00 micros    1.37 millis   sys time    0.30 millis  296.00 micros    0.00 millis

Viewing all articles
Browse latest Browse all 127

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>