Value In Brief – by Abanoub Hanna
All You Need To Know Explained In Brief

View time taken of last command in Fish shell

Linux Mac OS X Fish UNIX Tips & Tricks Tutorials

Just use $CMD_DURATION to get the time taken running the last command.

To make your prompt give you the elapsed time for every command you run in Terminal, add this function in your Fish config file ~/.config/fish/config.fish.

function fish_prompt; echo "$CMD_DURATION  "; end

The prompt will be like that.

Terminal prompt with elapsed time in Fish script

I hope this helps you. You know someone will benefit from this, share it with him/her, a friend or colleage.